DOMが書き換わったタイミングを知りたいな
["DOMNodeRemoved", "DOMNodeInserted", "DOMAttrModified"].each(function(e){ $(document).on(e,(function(ev){alert(e+" called")}) })
もっといい方法はあると思うけど、書き換わったタイミングさえわかればいいのでこんなかんじで
あとは、どの要素が書き換わったか、Eventオブジェクトevから探せばいいと思いますね
DOM関連のイベント
DOMのイベントを調べてみたら、W3CのDOM イベントにあった。
http://en.wikipedia.org/wiki/DOM_events#Common.2FW3C_events
Type Attribute Description Bubbles Cancelable DOMSubtreeModified (none) Fires when the subtree is modified Yes No DOMNodeInserted (none) Fires when a node has been added as a child of another node Yes No DOMNodeRemoved (none) Fires when a node has been removed from a DOM-tree Yes No DOMNodeRemovedFromDocument (none) Fires when a node is being removed from a document No No DOMNodeInsertedIntoDocument (none) Fires when a node is being inserted into a document No No DOMAttrModified (none) Fires when an attribute has been modified Yes No DOMCharacterDataModified (none) Fires when the character data has been modified Yes No
これで、なんとか出来そうですね。