Use addEventListener In IE this is attachEvent
if (td.addEventListener){ td.addEventListener('mouseDown', changeClass, true); } else if (td.attachEvent){ td.attachEvent('onMouseDown', changeClass); } function changeClass() { $(this).css('asds','asdasdsa'); } On May 28, 7:50 pm, melwood <[EMAIL PROTECTED]> wrote: > Hi, > > how can i mark/unmark (toggleClass) a td when: > > a) I press the left mouse button > b) Press the left mouse button and move over all tds (fast selection) > > a) is not so much of a problem, but how would I realize b) and in a > way it is not interffering with a) > > melwood