In my application I have a drop-down form that fires up an AJAX request onchange and returns the selected user name value with a "delete" image next to it.
<div id="el">User Name <img src="ico/del.gif" onclick="ajax_delete(12)" class="del" /></div>
Strangely if the page was loaded for the first time, the following jQuery code is executed correctly and the mouse pointer changes over all .del images:
$("img.del").css('cursor', 'pointer');
BUT, if the html code above is added by the AJAX request like this:
$("#el").html('User Name <img src="ico/del.gif" onclick="ajax_delete(12)" class="del" />');
the mouse pointer change doesn't work for the images added by the AJAX request.
Any clue why?