jQuery drag and drop prevent -


i have simple drawing application, can color cells of table, , if hold mouse button down, can color multiple cells move mouse. see example here: http://jsfiddle.net/mfzkg/21/

it works well, problem in cases on mousehold browser thinks doing drag , drop doesn't stop on mouseup, if click mouse.

does know way prevent drag , drop function or have idea how work around problem?

thanks!

i believe should it:

            $('td').mousedown(function(e) {                     e.preventdefault();                 ismousedown = true;             }); 

you may want add mouseup event whole body if mouse goes outside of box , button let go of, still resets.

            $("body").mouseup(function() {                 ismousedown = false;             });  

on side note, don't put html , body tags in jsfiddle or style tags in css pane.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -