I want to append some HTML inside this div, and the HTML has to have a click event on it also.
hello, world!
What about :
$("#myID").click( function () { var someText = "my dynamic text"; var newDiv = $("").append(someText).click(function () { alert("click!"); }); $(this).append(newDiv); } ) 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复