Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can also use the module pattern[1] to isolate code from tampering or conflicts:

  (function($, window, undefined) {
    $(document).ready({
      // etc.
    });
  }(jQuery, window);
[1] http://www.yuiblog.com/blog/2007/06/12/module-pattern/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: