i'm finishing writing a plugin, which allow to开发者_运维问答 zoom images, and then move it, to see other parts of image. But i have a problem.
as we know, when we try to move image, (ie when we mousedown
on it and move the cursor), the browser don't allow it.
i've written
$("img").mousedown(function(e)
{
e.preventDefault();
});
and it works in Mozilla, but doesn't for example in ie.
any ideas?
Thanks much
You can sort out IE by also adding e.preventDefault()
to your document's mousemove event handler:
$(document).mousemove(function(e){
e.preventDefault();
});
精彩评论