Template - New JavaScript File


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

this is the template i mostly use when create new js files


Copy this code and paste it in your HTML
  1. // new-file-name.js
  2. // dependencies: /js/prototype-1.4.0.js
  3. // /css/default.css
  4.  
  5. Event.observe(window, 'load', function(poEvent){
  6. $A(document.getElementsByTagName('*')).each(function(poElement){Element.cleanWhitespace(poElement)});
  7. $A(document.getElementsByTagName('FORM')).each(function(poElement){poElement.reset();});
  8.  
  9. }, false);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.