Issue
I have a drag UI program, where the mouse cursor on the draggable element changes to a grabbing hand on click.
The problem is, I allow the drag to happen anywhere on screen, and the cursor changes over anchor tags, etc...
I've tried $('*').addClass('grabbing'), but it's REALLY expensive.
Is there a simple easy code efficient way to handle this?
Solution
Do it at the CSS level:
* {
cursor: pointer;
}
doing it in jquery forces it to iterate every single node in the dom and rewrite its css classes. On a long document, that's a huge waste of time.
Answered By - Marc B
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.