
Untitled
By: a guest on
Aug 6th, 2012 | syntax:
None | size: 0.56 KB | hits: 12 | expires: Never
document.ready like functionality in javascript?
...
<script>...</script>
</body>
</html>
<body>
<!--
All your html tags here
....
....
-->
<script type="text/javascript">
//this should execute after the above tags and elements have rendered
</script>
</body>
(function(w,evt,fn){
if (w.addEventListener){// W3C DOM
w.addEventListener(evt,fn,false);
}
else if (w.attachEvent) { // IE DOM
w.attachEvent("on"+evt, fn);
}
})(window,'load',function(){
// your code here
});