[jQuery] How to auto bind event to a new created element?
hi,all
I bind some events to a list just like below:
$(document).ready(function(){
$("oUL > li").click(function(){
// do something here
});
});
but now I need to add sub nodes to the oUL dynamically, the new
elements(li nodes) do nothing when I click it, Anyone who can give me
some idea on how to solve it, I'm appreciated.
Thanks!