Skip to content

Instantly share code, notes, and snippets.

@RKushnir
Created March 14, 2014 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RKushnir/9545439 to your computer and use it in GitHub Desktop.
Save RKushnir/9545439 to your computer and use it in GitHub Desktop.
Show Intertop.ua product availability on click
$('.item_img').click(function(e) {
e.preventDefault();
var product_id = $(this).attr('href').match(/\/(\d+)\.html/)[1]
$.post('/shop/item/shops', {
region_id: '***region***',
size: '***size***',
product_id: product_id,
}, function(data) {
console.log(product_id, data.length > 0);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment