Using Jquery for the Development of Guest Wish List Extension

Dec 15, 2015 2029 Updated: July 3, 2025 11:07
Using Jquery for the Development of Guest Wish List Extension

In this article I will tell you how to use jQuery and we will analyze how to implement your own html for frontend.

The first thing that we should know about Magento 2.0 is that unlike Magento 1.x it contains several popular frameworks such as Prototype, jQuery + plugins, Angular etc.

You may ask why so many, it can cause overload and you won’t even need half of them!

But it’s not true. Magento 2.0 analyzes JS scripts and enables only those that are pre-defined.

But how can it be done?

One of the methods is to use the command require:


Now we know how to use jQuery and it’s time to use it for adding extra content to page.

Magento 2.0 uses new template that is called Luma. One of the best innovations is to use the data attributes in html.

These attributes can be easily transferred from default template to customized one without affecting designer’s idea.

How can it be used in Scripts?

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey


In this script we can see that we use the connection to [data-role=compare-products-link] for adding new button near “Compare Products”.

Before:

before 850x109

After:

after 850x96

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment