<script type="text/javascript" charset="utf-8"> $(function () { var isMouseDown = false; $("#our_table td") .mousedown(function () { isMouseDown = true; $(this).toggleClass("highlighted"); return false; // prevent text selection }) .mouseover(function () { if (isMouseDown) { $(this).toggleClass("highlighted"); } }) .bind("selectstart", function () { return false; // prevent text selection in IE }); $(document) .mouseup(function () { isMouseDown = false; }); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)