html:
<ul>
<li><input type="submit" id="myId" value="someVal"/>
</ul>
jQuery
$('ul').find('input[type="submit"]').click(function{
alert('nasty alert')
$(this).attr('id','newId');
});
$('input#newId').click(function(){
$(this).hide();
});
ok, so my intention is to change the id after one click and then the button to do something else(hide). i tried with live() too. In firebug it looks like the id has changed but my second click on the button triggers the same alert('nasty alert'). And something strange...if i use live(), on mouse right click the button dissapears (like it should). any sugestions? thanks