Guest User

Untitled

a guest
Apr 20th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <script type="text/javascript">
  2. window.onload = function(event) {
  3. // your code here
  4. };
  5.  
  6. // equivalent with jQuery (when window loads)
  7.  
  8. jQuery(window).load(function(event) {
  9. // your code here
  10. });
  11.  
  12. // alternatively with jQuery (when DOM is ready)
  13.  
  14. jQuery(document).ready(function(event) {
  15. // your code here
  16. });
  17.  
  18. // you can also call a function if this <script>-block is reached (loaded) first time
  19. // place the <script>-block before body-tag is closing and you have nearly what DOM-ready does.
  20. someFunction();
  21. </script>
Add Comment
Please, Sign In to add comment