我是 jquery 的新手。我的新任务是“jquery 中的 imgareaselect”。我指的是这个。但我缺乏理解逻辑的地方。请帮我创建“imgareaselect”
现在我的编码是:
<!DOCTYPE html>
<html>
<head>
<script src="http://odyniec.net/projects/imgareaselect/jquery.imgareaselect.pack.js"> </script>
<script src="http://odyniec.net/projects/imgareaselect/css/imgareaselect-animated.css"></script>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
</head>
<body>
<img id="photo" src="https://www.google.com/images/srpr/logo11w.png" />
<script>
$('img#photo').imgAreaSelect({
handles: true,
onSelectEnd: function (img, selection) {
alert('width: ' + selection.width + '; height: ' + selection.height);
}
});
</script>
</body>
</html>