json - Specify the callback parameter with JQuery.getJSON -


is there way specify value of callback parameter when using jquery's getjson method?

for example:

$.getjson('/content?callback=?', function(data) {}); 

generates following url:

content?callback=jquery15108431726952168015_1299633045933&_=1299633046552 

the parameter here generated randomly library.

i specify own callback parameter.

i use same callback parameter every request can aggresively cache response.

you need @ least on jquery 1.5 work.

// url generated "/content?callback=mycallback" $.ajax({   url: '/content?callback=?',   datatype: 'jsonp',   jsonpcallback: 'mycallback',   cache: true,   success: function(data) {} }); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -