How to add your own custom functions to jQuery

Recently I wrote a template on how to extend jQuery and how to create your own functions. Since then I came across even smaller code snippet on how to add your own custom functions, in other words how to create plugins for jQuery. So without further ado: $.fn.myFunction = function() {
return $(this).addClass('changed');
} And now, use it like this: $('.changePlease').myFunction(); And that

Comments

Popular posts from this blog

Genuine Windows 7 Ultimate: The GENUINE Windows 7 activator for x32 and x6480

Types and forms of imitation gemstone and manufactured

7 Tips before you buy detectors for gold and treasures and minerals