我在两个 Joomla 模块中有一个 jQuery 冲突。我在每个模块中都找到了以下代码。谁能帮我解决冲突?
第一个模块中的代码:
<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]."'"; for ($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>
第二个模块中的代码:
$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."
});
});
");