Saturday, 22 June 2013

Detect changes in the DOM

              Event is call when any modification in document object model
               ( like  div or input are added to the html)

            $(document).bind('DOMSubtreeModified', function () {
                console.log("hi");   // for FF 3+, Chrome
            });

            $(document).bind('DOMNodeInserted', function () {
                console.log("hi");  // for FF 2, Safari, Opera 9.6+
            });
           
            $(document).bind('DOMNodeRemoved', function () {
                console.log("hi");  // for FF 2, Safari, Opera 9.6+
            });

No comments:

Post a Comment