Ajax CORS
// Zepto CORS
$.ajax({
type: "get",
url: url,
data: data,
xhrFields: {
withCredentials: true
},
crossDomain: true,
beforeSend: function() {
console.log("beforeSend");
},
success: function(data) {
console.log("success");
},
error: function() {
console.log("error");
},
complete: function() {
console.log("complete");
}
})