-
-
Save Godoy/5110936 to your computer and use it in GitHub Desktop.
Observando alterações de DOM em uma div
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout | |
( | |
StartWatching, | |
100 | |
); | |
function StartWatching() | |
{ | |
$("#someDiv").bind('DOMSubtreeModified',function() { | |
alert('modificou'); | |
StopWatchingAndStartAgainLater(); | |
}); | |
} | |
function StopWatching() | |
{ | |
$("#someDiv").unbind('DOMSubtreeModified'); | |
} | |
function StopWatchingAndStartAgainLater() | |
{ | |
StopWatching(); | |
setTimeout | |
( | |
StartWatching, | |
100 | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment