Skip to content

The easiest way to use jQuery in Magento

September 15, 2011

There are many different ways to use jQuery in Magento. The point on this is that given that Magento uses Prototype as default javascript framework (arghhh!), if we try to use jQuery libraries directly, there is going to be a «conflict».

We can solve this activating the jQuery «no conflicts mode», but there are easier ways. The easiest I’ve found is to install the following extension:

After installing it, you can use jQuery functions without any problem. Just keep in mind that instead of the usual «$» at the beginning of each function, you have to use «jQuery». That is, for example:

jQuery('#show_video').click(function() {
jQuery('#video').show('slow', function() {
});
});
Advertisements

From → Extensions

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: