jQuery.config
Categories: Properties of the Global jQuery Object | Core | Properties of jQueryConfig
jQuery.config
Description: Configuration property for jQuery SDK and plugins.
-
jQuery.config
version added: 1.0
The jQuery.config
property is created on startup and all properties of jQueryConfig
will be transferred to jQuery.config
.
Another possibility is to set a meta tag named jQueryConfig before jQuery SDK is loaded,
the content attribute of this tag must be an JSON string in single quot syntax.
The properties of this JSON string will be transferred to jQuery.config
also.
Most plugins are using jQuery.config
to preconfigure them self.
-
Configure jQuery SDK.
Code:
// before include jQuery SDK Core jQueryConfig = { ajax: { dataType: 'json' }, depend: { minify: true, pluginRoot: './script' } }; // now include the jQuery SDK Core
Results:
// after include jQuery SDK Core jQuery.config = { ajax: { dataType: 'json' }, depend: { minify: true, pluginRoot: './script' } };