tags:

views:

157

answers:

1

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?

A: 

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);
Ambrosia