jQuery DOM Listener
jQuery DOM Listener
Use jQuery to manipulate the DOM as the page loads with this jQuery DOM Listener.
I found that sometimes it would be nice to edit the DOM before $(document).ready()
but there was no efficient way to do it at the proper time.
This plugin watches for defined selectors and, when found, will call the success() function, with one parameter, the found node.
Implementation is pretty straight-forward:
This plugin watches for defined selectors and, when found, will call the success() function, with one parameter, the found node.
Implementation is pretty straight-forward:
<script type='text/javascript'>
$(".side-pods").listen(".side-pod:first",{
success:function(nodeFound){
//manipulate as normal
//nodeFound.css("font-weight","bold")
}
});
</script>
We are then able to manipulate the side-pod node as soon as it is added to the DOM.