jQuery MiscnoConflict()Methods

jQuery 杂项方法jQuery Misc Methods

Examples

Use the noConflict() method to specify a new name for the jQuery variable:

var jq=$.noConflict();

Try it Yourself »

Definition and Usage

The noConflict() method releases the $ variable's jQuery control.

This method can also be used to specify a new custom name for the jQuery variable.

Tip:This method is useful when other JavaScript libraries use $ for their functions.


Syntax

$.noConflict(removeAll)

Parameters Description
removeAll Optional. A Boolean value specifying whether to release the jQuery control of all jQuery variables (including "jQuery").


jQuery 杂项方法jQuery Misc Methods

Other Extensions