偏移值,但控制台告诉我它没有定义:
ui is not defined
在我的 HTML 中包含 jquery 脚本:
<script language="javascript" type="text/javascript"
src="/templates/protostar/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript"
src="/templates/protostar/js/jquery-ui.min.js"></script>
<script language="javascript" type="text/javascript"
src="/templates/protostar/js/jclip.js"></script>
<script language="javascript" type="text/javascript"
src="/templates/protostar/js/cp.js"></script>
我不明白...这是我的 jQuery 代码:
<script type="text/javascript" language="javascript">
(function ($) {
$(document).ready
(
function () {
$('.mapban').parent().jclip(0, 0, 1060, 750);
$('#mapplane').draggable({ containment: $('#containermy'),
scroll: false,
drag: function() {
console.log(ui.offset);
},
});
})
</script>