3

I'm changing my cursor dynamically by setting node.style.cursor = 'foo' when an item becomes selected. It seems that my cursor doesn't change until the mouse moves a pixel.

Is there a way to tell the browser to change it immediately?

mikelikespie
  • 5,682
  • 3
  • 31
  • 36

1 Answers1

0

You can try with jQuery.

$(node).css('cursor', 'wait');

Or have a play with the changing of classes dynamically.

The css will be:

span.auto {cursor:auto}
span.wait {cursor:wait}

The javascript will be:

$(node).removeClass('auto');
$(node).addClass('wait);
AmbrosiaDevelopments
  • 2,576
  • 21
  • 28