//绑定移動イベント sign.on('mousedown', function (e) { sign.data('x', e.clientX); sign.data('y', e.clientY); varposition =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 >範囲.最大Y ? range.maxY : y;
sign.css({ 左: x, 上: 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(); 🎜 > }); };