//绑定移动事件 sign.on('mousedown', function (e) { sign.data('x', e.clientX); sign.data('y', e.clientY); var position = sign.position(); $(document).on('mousemove', function (e1) { var x = e1.clientX - sign.data('x') + position.left; var y = e1.clientY - sign.data('y') + position.top; x = x x = x > range.maxX ? range.maxX : x; y = y y = y > range.maxY ? range.maxY : y;
sign.css({ left: x, top: y }); }).on('mouseup', function () { $(this).off('mousemove').off('mouseup'); }); }); });
$('.cancel', _btnPanel).click(function () { var r = true; if (_add.attr('disabled') == 'disabled') { if (!confirm("未确定的盖章将被取消,确定要关闭吗?")) { r = false; } } if (r) { //删除未确定位置的盖章 $('.sign:not(.ok)', _parent).remove(); _btnPanel.remove(); } }); };
<script> <BR> var a =$("#test").zSign({ img: '1.gif'}); <BR> </script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn