when we need to play with html which is already manipulated with jquery we have to use .delegate() function in Jquery.
suppose you have generated some list item by an ajax call from DB. Now you've to give an event functionality by clicking those list. then .delegate() will help you a lot
suppose you have generated some list item by an ajax call from DB. Now you've to give an event functionality by clicking those list. then .delegate() will help you a lot
$("body ul").delegate("li", "click", function(){
//add some code
alert( $(this).text() );
});