jQuery 3 slim ajax basic example

后端 未结 1 1542
旧巷少年郎
旧巷少年郎 2020-12-03 21:04

I\'m new to jQuery 3. The following is a basic fiddle, working with previous versions of jQuery, but does not work with jQuery 3

$(function() {
    $.ajax({
          


        
相关标签:
1条回答
  • 2020-12-03 21:56

    jQuery 3 slim version doesn't support ajax.

    According to the release docs,

    Along with the regular version of jQuery that includes the ajax and effects modules, we’re releasing a “slim” version that excludes these modules. All in all, it excludes ajax, effects, and currently deprecated code.

    To use .ajax method, simply use the full version one.

    Here's the working fiddle

    0 讨论(0)
提交回复
热议问题