jQuery Listener Demo
You can see with this example that the nodes highlighted in red are
available for editing a lot sooner than the others.
The difference:
| Ready (Black) | Listener (Red) | Result |
|---|---|---|
| Loading... | Loading... | Calculating... |
$(document).listen(".side-pod",{
success:function(nodeFound){
$(nodeFound).addClass("lis");
}
});
$(document).ready(function(){
$(".doc-pod").find("span").addClass("doc");
});
Loaded: Nope
Loaded: Nope
Loaded: Nope
Loaded: Nope
Loaded: Nope
Loaded: Nope
Loaded: Nope
Loaded: Nope