Setup:
I am doing an ajax-jsonp call, which is working fine. The callback function of this changes value of a variable, \"myVaraible\". Just after the c
I believe there's no reason you cannot do
function myfunction() {
return $.ajax({
url: myURL,
dataType: "jsonp",
jsonp : "jsonp",
jsonpCallback: "jsonpCallbackFn"
});
}
and then
...
$("#preview_button").mouseover(function() {
myfunction().done(function(){
alert("after myfunction");
});
});
jQuery appears to do a bunch of magic behind the scenes to normalize jsonp requests to act somewhat like jquery ajax requests, so I think this is fine. Let me know otherwise.