Can someone enlighten me on the jQuery delegate, what events are handled and what aren’t. The follow code doesn’t work
$("#browser").delegate( ".photo", {
"load": function(e) {
alert("photo loaded");
}
});
but the following code work
$(".photo").load( function(e) {
alert("photo loaded");
} );
I also try to delegate changeData event to a class which doesn’t work as well
$("#browser").delegate( ".thumbnail", {
"changeData": function(e, prop, value) {
alert( prop + " = " + value );
}
});
but the following code work
$(".thumbnail").bind( "changeData", function(e, prop, value) {
alert( prop + " = " + value );
}
Not:
But:
And you cannot use live and delegate with those events, because they don’t bubble.