JQuery, load elements after page loaded

LawyerX

New Member
I want to do something like this:\[code\]<img src="" class="after-all" data="http://stackoverflow.com/assets/huge-bg.png" /><div class="after-all" data="http://stackoverflow.com/actions/div-content.html"></div>\[/code\]And in JS\[code\]$("after-all").loadMissing();\[/code\]I think the best way is build a plugin with recognize method:\[code\]if (img) $(this).attr('src', $(this).attr('data'));if (div) $(this).load($(this).attr('data'));\[/code\]Is this possible ? What is the best way to do this ? How to do this ?
 
Back
Top