Tutorial by Examples

The jQuery API may be extended by adding to its prototype. For example, the existing API already has many functions available such as .hide(), .fadeIn(), .hasClass(), etc. The jQuery prototype is exposed through $.fn, the source code contains the line jQuery.fn = jQuery.prototype Adding functio...
This method extends the jQuery prototype ($.fn) object to provide new custom methods that can be chained to the jQuery() function. For example: <div>Hello</div> <div>World!</div> <script> jQuery.fn.extend({ // returns combination of div texts as a result g...

Page 1 of 1