自己做的jquery放大镜效果插件,运行提示e没有定义?
html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>放大镜效果</title>
<link rel="stylesheet" type="text/css" href="css/myPlugin-base.css" />
<link rel="stylesheet" type="text/css" href="css/shop-base.css" />
</head>
<body>
<div id="zoomPlay">
<div class="zoomPup">
<span class="mark"></span>
<img src="images/zoomPic.jpg" alt="" />
</div>
<div class="zoomDiv">
<div class="big"><img src="images/zoomBPic.jpg" alt="" /></div>
</div>
</div>
</body>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/zoomPlay.js"></script>
<script type="text/javascript">
$('#zoomPlay').bk_zoom({onPlay:true});
</script>
</html>
js:
$(function(){
$.fn.bk_zoom=function(option){
var elm=$(this);
var mouseX = 0, //鼠标移动的位置X
mouseY = 0, //鼠标移动的位置Y
maxLeft = 0, //最右边
maxTop = 0, //最下边
markLeft = 0, //放大镜移动的左部距离
markTop = 0, //放大镜移动的顶部距离
perX = 0, //移动的X百分比
perY = 0, //移动的Y百分比
bigLeft = 0, //大图要移动left的距离
bigTop = 0; //大图要移动top的距离
defaults={
onPlay:false
}
opt=$.extend(defaults,option);
var zoomOnce={
init: