开发者

Conflicting $.ajaxSetup for jQuery functions

I have two jQuery scripts - One for inline form editing and the second is the jQuery autocomplete.

The autocomplete has the following ajaxSetup:

$.ajaxSetup({
   url: '/notes/inlineedit',
   t开发者_如何学Goype: 'POST',
   async: false,
   timeout: 500
});

Meanwhile, the autocomplete requires type: TRUE and async: TRUE. Is there a way to set this options to only affect one script?


This is setting ajax settings globally that should only be done per ajax request. You can pass all of the same options to the $.ajax([settings]) function

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜