Possible Duplicate:
jQuery event to trigger action when a div is made visible
How can I run some my code when element, wich was loaded by ajax, become visible("display" is switching from "none" to "block")? Well, I need some event like
$('#element').live('show', function(){
// CODE
});
Or event that watching for deleting/adding some class to element
The problem was solved by using jquery-appear plugin
https://github.com/morr/jquery.appear
There's nothing built-in jQuery that allows you to achieve that. You may take a look at the livequery plugin. For example:
$('#element').livequery(function() {
// CODE
});
When an element with id="element" is added to the DOM the callback should be executed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With