WebKul
May 18
How to Use Jquery in Joomla Module development

Jquery really an awesome java-script library why we like this

1 - Easy DOM manipulation

2 - Easy Ajax

3 -  Browser compatibility and many more

but if you want to use jquery in joomla module development you can not use it directly , because joomla is based on mootools java-script library but thanks to jquery this awesome library has a mode "no conflict mode" . what you have to do is

First define the noconflict() function

<script type="text/javascript">var $j = jQuery.noConflict();</script>

and after that change the $ of the jquery to the $j as showb below

 

<script type="text/javascript">

$j(document).ready(function(){

$j('ul.thumb li').Zoomer({speedView:<?php echo $speedView; ?>,

speedRemove:<?php echo $speedRemove; ?>,

altAnim:true,

speedTitle:<?php echo $speedTitle; ?>,

width:'<?php echo $imagewidth."px"; ?>',

height:'<?php echo $imageheight."px"; ?>',

debug:false});

});

</script>

That's it . Still you have any query or suggestion please drop a mail in our mailbox or just comment it out .enjoy ;)

 

1 - http://webkul.com/psd-to-joomla-services
2 - http://webkul.com/html-to-joomla-services
3 - http://webkul.com/joomla-tutorial/how-site-optimization-helps-in-seo-search-engine-optimization
4 - http://webkul.com/joomla-tutorial/joomla-web-services-and-extension-module-component-plugins-development-concept
5 - http://webkul.com/joomla-tutorial/easy-tips-to-improve-your-google-rank-with-joomla
6 - http://webkul.com/joomla-tutorial/how-to-add-xmap-sitemap-in-google-webmaster-tool
7-  http://webkul.com/kunena/search-engine-optimization-seo/joomla-seo
8 -http://webkul.com/joomla-seo-services