Skip to content

Instantly share code, notes, and snippets.

@SDKiller
Created July 13, 2015 14:54
Show Gist options
  • Save SDKiller/99f87838546fc30d4963 to your computer and use it in GitHub Desktop.
Save SDKiller/99f87838546fc30d4963 to your computer and use it in GitHub Desktop.
<script type="text/javascript" src="http://vozmivcredit.ru/media/api/widget.js"></script>
<script type="text/javascript">
var kreditData = {
code: 'AzNjE5NzA',
items: [
{
title: "Apple iPhone 6+ 128Gb space gray",
qty: 1,
price: "37400.00"
}
]
};
(function ($) {
$(document).ready(function () {
$('.link_kredit > img').on('click', function () {
kVK.openWidget(kreditData);
});
$('#quantity').on('change', function () {
kreditData.items[0]['qty'] = parseInt($(this).val());
});
});
})(jQuery);
</script>
<div class="link_kredit">
<img src="http://vozmivcredit.ru/media/api/button_1.png" style="cursor:pointer" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment