Skip to content

Instantly share code, notes, and snippets.

@SDKiller
Created July 13, 2015 13:58
Show Gist options
  • Save SDKiller/30558b5dfc213da25a03 to your computer and use it in GitHub Desktop.
Save SDKiller/30558b5dfc213da25a03 to your computer and use it in GitHub Desktop.
(function ($) {
var kVK = {
apiUrl: 'http://vozmivcredit.ru/api/',
openWidget: function (data) {
$.ajax({
url: kVK.apiUrl,
data: data,
type: 'POST',
cache: false,
dataType: 'jsonp',
crossDomain: true,
jsonp: 'jsonp',
jsonpCallback: 'kVK.openWindow'
});
},
openWindow: function (response) {
window.open(response.url, "credit", "width=800,height=650,resizable=yes,scrollbars=yes,status=no,menubar=no,toolbar=no,location=no,directories=no");
}
};
window.kVK = kVK;
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment