Looking over the code, I discovered the following distinctions between jquery.js and jquery.slim.js:
The following features are removed from jquery.slim.js:
- jQuery.fn.extend
- jQuery.fn.load
- jQuery.each // Attach a bunch of functions for handling common AJAX events
- jQuery.expr.filters.animated
- ajax settings like jQuery.ajaxSettings.xhr, jQuery.ajaxPrefilter, jQuery.ajaxSetup, jQuery.ajaxPrefilter, jQuery.ajaxTransport, jQuery.ajaxSetup
- xml parsing like jQuery.parseXML,
- animation effects like jQuery.easing, jQuery.Animation, jQuery.speed
About jQuery Slim Build
Sometimes ajax is unnecessary, or you prefer to use one of the many standalone libraries that specialize in ajax requests. Furthermore, it is frequently easier to use a combination of CSS and class manipulation for all of your web animations. Along with the standard version of jQuery, which includes the ajax and effects modules, we’ve released a “slim” version that does not. Overall, it excludes ajax, effects, and code that is currently deprecated. jQuery’s size is rarely a concern for load performance these days, but the slim build is about 6k gzipped bytes smaller than the regular version – 23.6k vs 30k.
As previously stated, the Ajax and effects modules have been excluded from jQuery slim. As of 3.3.1, the size difference for the unzipped minified version is 85k vs 69k (16k saving for slim) or 30vs24 for zipped. It is important to note that bootstrap 4 uses the slim jQuery, so if someone wants the full version, they must call that instead.
$.ajaxSetup is not a function Error
This could be due to the fact that you are using a slim version of jQuery. To use the setting function $.ajaxSetup, you must use the standard jQuery version.
Download jQuery Core – All Versions
You can get the jquery version you need by clicking here https://code.jquery.com/jquery/