Function loading in prototype


/ Published in: JavaScript
Save to your folder(s)

This is a prototype based method for loading functions, this is an alternative to using window.onload = function();


Copy this code and paste it in your HTML
  1. function app_events(){
  2. //add in your functions here;
  3. }
  4.  
  5. Event.observe(window, 'load', app_events);

Report this snippet


Comments


You need to login to view comments.