'].join('');
}
function handleError(){
$('#gui-modal-product-inventory-location-wrapper').show();
$('#gui-modal-product-inventory-location-content').html('');
}
// Get product inventory location information
function inventoryOnClick() {
$.getJSON('https://www.spokesmancycles.com/product-inventory/?id=80014783', function (response) {
if(!response || !response.productInventory || (response.productInventory.locations && !response.productInventory.locations.length)){
handleError();
return;
}
var locations = response.productInventory.locations || [];
var rows = locations.map(function(item, index) {
return createLocationRow(item, index === 0)
});
$('#gui-modal-product-inventory-location-content').html(rows);
var dateObj = new Date();
var hours = dateObj.getHours() ',
'', 'Last updated:', ' ',
'Today at ', hours, ':', minutes,
'
',
'
Online and in-store prices may differ
'].join('');
$('#gui-modal-product-inventory-location-footer').html(footerContent);
$('#gui-modal-product-inventory-location-wrapper').show();
}).fail(handleError);
}
$('#productLocationInventory').click(inventoryOnClick);
// When the user clicks on 'Close' in the modal, close it
$('#gui-modal-product-inventory-location-close').click(function(){
$('#gui-modal-product-inventory-location-wrapper').hide();
});
// When the user clicks anywhere outside of the modal, close it
$('.gui-modal-product-inventory-location-background').click(function(){
$('#gui-modal-product-inventory-location-wrapper').hide();
});
})();
Vero Pro 1x cranksets off the same outstanding value and performance as the others in the Vero line specifically designed for use with 10 and 11 speed 1x drivetrains
Steel Megatooth chainring for tensioner-free rentention