QuestionQ32

VerifiedAdobe Experience Manager Sites

An Adobe Commerce developer needs to create a sticky widget.

How should the widget be initialized with the data-mage-init attribute?

Explanation

The sticky widget is initialized by placing it as the data-mage-init component key and passing its options in a nested object. Its container option accepts the selector for the element whose height limits the sticky element’s maximum offset, so .main-item-form belongs in {"sticky":{"container": ".main-item-form"}}. Adobe Commerce Sticky widget documentation

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!