Jquery simple plugin definition - Javascript jQuery

Javascript examples for jQuery:Plugin

Description

Jquery simple plugin definition

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-compat-git.js"></script> 
  <script type="text/javascript">
    $(window).on('load', function() {
(function($) {/*from www . j  a  v a2 s.  c  o  m*/
    $.fn.alertme=function(){
    console.log('just testing');
    };
    }(jQuery));
  $(document).ready( function() {
      $(document).alertme();
    });
    });

      </script> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials