noConflict Configuration
Categories: Core | Properties of jQueryConfig
jQueryConfig.noConflict
Description: Preconfigure of jQuery.noConflict.
-
jQueryConfig.noConflict
version added: 1.0
The jQueryConfig.noConflict
allows to configure jQuery.noConflict()
before jQuery is loaded.
Set a boolean indication to enable or disable "jQuery no conflict mode" on startup. It's also posible to define a noConflict alias of jQuery on startup.
- see also:
jQuery.config
-
Set no conflict mode on startup.
Code:
// before include jQuery SDK Core jQueryConfig = { noConflict: true }; // now include the jQuery SDK Core
Results:
// after include jQuery SDK Core $ !== jQuery
-
Set no conflict mode on startup and define an alias
Code:
// before include jQuery SDK Core jQueryConfig = { noConflict: '$jq' }; // now include the jQuery SDK Core
Results:
// after include jQuery SDK Core $jq === jQuery