An image cropper: How to prevent the default drag n' drop action?
Posted
by David Gore
on Stack Overflow
See other posts from Stack Overflow
or by David Gore
Published on 2009-11-27T11:20:22Z
Indexed on
2010/03/20
6:01 UTC
Read the original article
Hit count: 206
JavaScript
|crop
I am developing an image cropper and would like to ask you the following question: In order to prevent the default drag n' drop action when you press the left button on an image and keeping it pressed try to move the mouse, wouldn't it be cross-browser if to just use the picture as a background to a div box?
Just like so:
<div id="theDiv" style="background:url(pic.png) no-repeat;"></div>
How do you think? Is it acceptable? Not too ugly? Or should be done with JS?
© Stack Overflow or respective owner