jQuery: Can I automatically apply a plug-in to a dynamically added element?

前端 未结 4 1458
伪装坚强ぢ
伪装坚强ぢ 2021-01-21 02:33

I\'m in the process of converting my web app to a fully AJAX architecture.

I have my master page that is initially loaded and a div container that is loaded with dynamic

4条回答
  •  遥遥无期
    2021-01-21 02:43

    The DOM 2 MutationEvent is what you really want, but unfortunately it isn't supported by IE. You'll need to either use live()/ delegate() binding in the plug-in, or (as I did when I had to work around this) use callbacks from your AJAX loaders indicating the scope of what has changed.

提交回复
热议问题