//监听某个元素下新增元素事件

$("#photos").bind('DOMNodeInserted', function(e) {  

    alert('element now contains: ' + $(e.target).html());  

});  

//监听某个元素里移除元素的事件

$("#photos").bind('DOMNodeRemoved', function(e) {
  var num = 0;
  $("#photos li").each(function(){
  num += 1;
  });
});

相关文章:

  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
相关资源
相似解决方案