Is there any way to have the dblclick event cancel the click event?
I have a table of data, where I was planning to have a click on a column header re-order the table, and double-click remove the column, but obviously by double-clicking the click event fires twice and I end up with a table sorted by a hidden column.
Can anyone suggest a way of allowing the double-click event to cancel the click event?
Perhaps you could make the click event start a timeout for whatever function you want to call. If the timeout ID exists already, then clear it. This means that on double click the onclick will called but then be canceled before the timeout ends. I haven't tried it but I don't see why it shouldn't work.
Bookmarks