JSFiddle - React, Tailwind, and code Playground
HTML
<div id="b1"><b>Click me</b> button 1 - when clicked it will alert '<span style="color:red">test</span>' when clicked the first time, and then change its id so that next click will execute a different handler..</div>
CSS
div{padding:10px;width:200px;black:white;background-color:#ccc;}
b{color:yellow}
JavaScript
$('#b1').live('click', function(){
alert('test');
$(this).attr('id','newid');
});
$('#newid').live('click', function(){
alert('event for the new id');
});