JQuery 1.5 and new “Text JSON” datatype

前端 未结 3 397
说谎
说谎 2020-12-28 18:14

I have just updated to JQuery 1.5 and all my ajax calls that return JSON and a number of plugins instantly broke.

In my pre-1.5 code, I specified the dataType like:<

3条回答
  •  清歌不尽
    2020-12-28 18:51

    I came across this JQuery bug which fixes the problem http://bugs.jquery.com/ticket/8084.

    Adding the following code after the JQuery script declaration fixes the problem:

    $.ajaxSetup({ jsonp: null, jsonpCallback: null });

提交回复
热议问题