passer1991

2013年9月10日

jquery为动态添加的元素绑定事件

摘要: 经测试 live,on 方法都不起作用.delegate方法是可以的.举例如下: $("#rightBox,#leftBox").delegate("p","click",function(){ if($(this).hasClass("selected1")) { $(this).removeClass("selected1"); console.log("right"); }else { $(this... 阅读全文

posted @ 2013-09-10 11:37 passer1991 阅读(156) 评论(0) 推荐(0) 编辑

导航