Basic jQuery Function Template


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



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.