Home   >>   Easy jQuery with Joomla!

Taylor Swift

Taylor Alison Swift (born December 13, 1989) is an American country pop singer-songwriter and actress.

Rihanna

Rihanna (born February 20, 1988) is a Barbadian R-B recording artist and model born in Saint Michael, Barbados.

Black Eyed Peas

The Black Eyed Peas is a Grammy Award winning hip hop group that formed in Los Angeles, California in 1995.

Lady Antebellum

Lady Antebellum is an American country music group formed in Nashville, Tennessee in 2006.

Lady Gaga

Lady Gaga is an American recording artist who rose to fame with her first two singles "Just Dance" and "Poker Face".

The Killers

The Killers is an American rock band from Las Vegas, Nevada, formed in 2002 who have sold over 16 million records worldwide.

Image 7

Image 7 teaser

Image 8

Image 8 teaser

Image 09

Image 9 teaser

jQuery support in Joomla! PDF Print E-mail

Cohabitation of jQuery and Mootools in Joomla 1.5 is sometimes a very frustrating nightmare.

I want just to share my experience in solving these conflicts encountered during the development and installation of my 2 modules "zooinfo" and "coinslider" on several web sites that I administer.

 


1) I found that the excellent system plugin OSjquery from joomlaguru is a generic solution and can solve lot of troubles.

This plugin exhibits the following behaviors:(excerpt from joomlaguru)

a. Two modes

User can select to replace mootools with jQuery completely or use jQuery in conjunction with mootools. Using jQuery with mootools introduces noConflict features of jQuery and replaces '$' operator with jquery. This allows other libraries to use '$' operator without conflict.
The plugin will also ensure that Mootools is loades before any jQuery script.

b. Where to use selection

Use can select where to use jQuery. User can choose to use jQuery in frontend and/ or in administrator.

c. Allows other application to check if jquery is loaded.

This plugin also introduces a variable in application session that allows others to check if jquery is loaded or not.

 

The jquery library must be found in directory: /plugins/system/osjquery  and the plugin is delivered with the
jquery-1.3.2.min.js library.

If you need to change the library version, upload the wanted library file in the folder and adapt the code of the file /plugins/system/osquery.php with the correct libray file name.

In order to bypass the edition process, I slightly modified the original version in order to add a setting allowing to define the library file name. The only thing you still need to do is to push the wanted library in the folder as defined hereabove and reference the new file in the plugin settings.

You will find my updated version in the download section of the site.
Note: do not forget to disable the settings in the jQuery modules to not load the library and not use the noconflict mode (the plugin will do the job).
Full credits stay with the original creator.

 


I found also lot of very important and straightforward information in the excellent reference book (I can't survive without it!) of Joseph L. Leblanc "Learning Joomla! 1.5 - Extension Development" edited by PACKT Publishing.

Chapter 8 "Using Javascript effect" has a specific section about Joomla! and Mootools cohabitation.

Packtpub has provided this chapter as a book's sample.

Read it carefully as sometimes you need to adapt one line of code in the jquery plugin as described on page 184.

 

I hope you can find here enough information in order to use my jQuery modules in any Joomla! environment.

Daniel

Update on 10/01/2011: This site uses now the excellent plugin jQuery++ Integrator