我正在尝试在目录图像上的 Joomla 驱动网站上实现 Jquery缩放。我不能让这个东西工作,所以有人可以帮我解决这个问题吗?
我在头部添加了这些脚本:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js" type="text/javascript"></script>
<script src="http://www.myurl.mk/templates/beez_20/javascript/jquery.zoom.js"></script>
这是它给出的错误:
Uncaught TypeError: Object #<HTMLDocument> has no method 'ready'
(anonymous function)
这是我的代码:
<script>
$(document).ready(function(){
$('#ex1').zoom({url: '<?php echo $this->item->imageXLarge; ?>'});
});
</script>
<div class="itemImageBlock" style="float:none;">
<span class="itemImage" id="ex1">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
</span>