Answer the question
In order to leave comments, you need to log in
How to fire an event when you hold down the mouse button?
There is a table with columns https://jsfiddle.net/eywraw8t/490541/
I need to be able to change the width of the column when holding the edge of the column. Now it happens something like this: when the mouse leaves the border, the event still works, it does not stop, and it is necessary to release the mouse in the border itself.
Of course, it would be ideal if you attach an event to the mouse, so that it follows not only the expansion of the column, but when you still need to narrow the column
Answer the question
In order to leave comments, you need to log in
You need to hang the mouseup event on the document so that wherever the button is released, the handler would still be called.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question