我尝试使用 jqzoom javascript,但不起作用。在 firebug 中出现此错误 TypeError: $(...).jqzoom is not a function。我下载并加载了 javascripts。代码是:
<script src="{base_url()}assets/js/jquery-1.9.0.min.js" type="text/javascript"></script>
<script src="{base_url()}assets/js/jquery.jqzoom-core.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="{base_url()}assets/css/jquery.jqzoom.css" >
<script>
$(document).ready(function(){
$('.xxx').jqzoom();
});
</script>
{foreach $items as $item}
<div class="item_details">
<a class="xxx" href="{base_url()}assets/image/{$item->code}/{$item->name}"><img id="img_details" src="{base_url()}assets/image/{$item->code}/{$item->name}"></a>
</div>
{/foreach}