In the past we have used our free JB Library jQuery plugin to load the jQuery library for our templates and extensions but the next version of the Zen Grid Framework (due in the next few weeks) changes all of that.
The new version of the framework will be moved from being a collection of files stored in the template folder on your site to a fully fledged Joomla system plugin which means we can incorporate most if not all of the current JB Library functionality into the Framework plugin.
Looking upstream and downstream
In addition to this we are also going to be implementing what is quickly becoming a standard way of checking if jQuery is loaded on the page. Yireo posted about this solution recently, and the folk at Yootheme (perhaps the originators of the technique?) have implemented the same thing in their Warp framework and Zoo extensions. Another joomla jquery plugin and other Joomla developers are implementing the technique as well.
The technique basically looks upstream (eg before the plugin has fired) to see if jQuery has loaded and if it has it doesn't do anything; while if it hasn't, it will load the version you have selected in the template parameters onto the page.
The framework will also provide the option of stripping scripts from the page that may not use this technique and have no "off switch" in their options. This way you get to ensure that your site only loads one instance of the jQuery library and therefore avoids conflicts with any 3rd party extensions.
I'll be posting more updates of feature upgrades in the Zen Grid Framework so stay tuned for more info in the coming weeks.blog comments powered by Disqus