I have just discovered live events in jQuery.
I am trying it out. I have written a little snippet to bind the mouse hovering over submit buttons in a form:
jQuery("form img.submit_btn").live('hover', function(){
(
function () {
jQuery(this).css('cursor','pointer');
},
function () {
jQuery(this).css('cursor','auto');
}
);
});
However, it has no effect. Have I missed something?
[Edit]
It has just been brought to my attention that this behavior can be trivially implemeted using CSS. Perhaps then, the example I gave above is too simple. However, the underlying question still is how to use the 'live' call to bind hover events (so I can do something more complicated -e.g. animation etc, which cannot be done using CSS alone)