jQuery.sub()    **DEPRECATED 1.7 and REMOVED 1.9** JQ Home  <<  Core & Internals  <<  jQuery.sub()

Create a new copy of the jQuery object.

Shorthand version $.sub()

Description

The jQuery.sub() method allows us to create a new copy of jQuery whose values can be altered without affecting the original jQuery object.

This method was deprecated in jQuery 1.7 and removed in jQuery 1.9 so we are just showing it for completeness.

As the major use for this method is for plugins to work on a copy of jQuery, without modifying the original jQuery object, this method was moved to a plugin in jQuery 1.8 for this purpose.

Syntax

Signature Description
jQuery.sub()Create a new copy of jQuery whose values can be altered without affecting the original jQuery object.

Parameters

None.

Return

A jQuery object either containing the elements matched or empty.

Related Tutorials

jQuery Basic Tutorials - Lesson 2 - jQuery Core & Internals