javascript - Joomla Modules jQuery conflict -


i have jquery conflict in 2 joomla modules. found below code in each of modules. please me resolve conflict?

code in first module:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>  //...  <script type="text/javascript">   jquery(document).ready(function () {     jquery('#jeyw<?php echo $module->id ?>').weatherfeed([<?php echo "'".$citycode[0]."'"; ($i=1; $i<count($citycode); $i++){echo ",'".$citycode[$i]."'";}?>],{       unit: '<?php echo $unit ?>',       image: <?php echo $image ?>,       country: <?php echo $country ?>,       highlow: <?php echo $highlow ?>,       wind: <?php echo $wind ?>,       humidity: <?php echo $humidity ?>,       visibility: <?php echo $visibility ?>,       sunrise: <?php echo $sunrise ?>,       sunset: <?php echo $sunset ?>,       forecast: <?php echo $forecast ?>,       link: <?php echo $forecastlink ?>,       showerror: true,       linktarget: '_blank',       woeid: <?php echo $woeid ?>     });   }); </script> 

code in second module:

$document->addscript(juri::base(true).'/modules/mod_muscol_featured_albums/tmpl/jcarousel/lib/jquery-1.2.3.pack.js');  $document->addscript(juri::base(true).'/modules/mod_muscol_featured_albums/tmpl/jcarousel/lib/jquery.jcarousel.pack.js');  $document->addstylesheet(juri::base(true).'/modules/mod_muscol_featured_albums/tmpl/jcarousel/lib/jquery.jcarousel.css');  //...  $document->addscriptdeclaration("   console.dir(jquery.fn.init.prototype);   jquery(document).ready(function() {     jquery('#random_album_".$random_id."').jcarousel({       // configuration goes here       scroll: ".$scroll."       ".$auto."       ".$animation."       ".$circular."       ".$vertical."     }); }); "); 

you can try jquery easy. read reviews understand how great component is. have been using long time now.

features:

  • jquery , jquery ui libraries can hosted in joomla! or called google api libraries in http or https (set explicit versions proper caching),
  • no coding necessary in front or end (no need add code template or mess joomla! core),
  • places jquery calls after mootools calls perfect compatibility,
  • adds noconflict code,
  • sets 'jquery' variable 'true' @ application level,
  • strips out other jquery, jquery ui library calls, including noconflict calls added other modules or plugins,
  • choose jquery ui basic styling or custom theme.
  • new: possible expert tweaks
  • new: plugin can enabled or disabled in specific portions of site
  • new since v1.2.0: mootools libraries can tentatively disabled in front end
  • new since v1.3.0: reporting , more options in solving more advanced cases
  • new: joomla! 3.0 specific version release

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -