QuestionQ16

Layout/UI

A developer must initialize a jQuery UI widget on a particular HTML tag.

Which HTML attribute is used for this?

  • A x-magento-init
  • B data-mage-init
  • C data-ui
Explanation

The data-mage-init attribute declaratively attaches and initializes a JavaScript component or jQuery UI widget on the specific HTML element that contains it. Adobe Commerce documents it as the approach for targeting a particular HTML element directly.

Learn more

Community Discussion

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