Posted By

adambundy on 03/18/11


Tagged

jquery function templatejavascript


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

adambundy
jillella
Some0ne


Basic jQuery Function Template


 / Published in: jQuery
 

  1. <script>
  2. $(document).ready(function () {
  3. // jq domready functions - execute the function
  4. $('#element').myFunctionName();
  5. });
  6.  
  7.  
  8. (function ($) {
  9.  
  10. $.fn.myFunctionName = function (limit, interval) {
  11. // do stuff
  12. };
  13.  
  14. })(jQuery);
  15.  
  16. </script>

Report this snippet  

You need to login to post a comment.