jquery - Select cells on table by dragging on tablets -
there questions it, , solution seems simple... how make work on tablets?
$(function () { var ismousedown = false, ishighlighted; $("#our_table td") .mousedown(function () { ismousedown = true; $(this).toggleclass("highlighted"); ishighlighted = $(this).hasclass("highlighted"); return false; // prevent text selection }) .mouseover(function () { if (ismousedown) { $(this).toggleclass("highlighted", ishighlighted); } }) .bind("selectstart", function () { return false; }) $(document) .mouseup(function () { ismousedown = false; }); });
i tried bind touchstart
, touchend
simultanously, problem seems mouseover
event.
this plugin worked when using jquery draggable, doesn't seems fix problem in here.
Comments
Post a Comment