Fresh JavaScript file (With namespaced, closured module pattern)


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

A JavaScript starter with a namespace and closure


Copy this code and paste it in your HTML
  1. $(document).ready(function() {
  2. NAMESPACE.init();
  3. });
  4.  
  5. var NAMESPACE = NAMESPACE || {};
  6.  
  7. NAMESPACE.init();
  8.  
  9. (function($) {
  10.  
  11.  
  12. }(jQuery));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.