Rev 26744 | Rev 27184 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(function() {$(".product-detail").live('click', function() {loadItems("main-content");});$(".product-info").live('click',function() {console.log(itemCatalogId);doAjaxRequestHandler(context + "/getProductInfo?catalogId="+ itemCatalogId, "GET", function(response) {$('.product-info-container').html(response);$("#compareItem").hide();});});$(".compare-with").live('click', function() {$("#compareItem").show();});catalogIds = [1021975, 1022020];$(".product-compare-info").live('click',function() {changedIndex = $(this).closest('th').index()-1;if(typeof compareCatalogId!="undefined") {//always push to lastif(changedIndex==-2) {catalogIds[2] = compareCatalogId;} else {catalogIds[changedIndex] = compareCatalogId;}}doAjaxRequestHandler(`${context}/getProductCompareInfo?catalogIds=` + catalogIds.join(","), "GET",function(response) {console.log(response)$('#' + "main-content").html(response);});});});function loadItems(domId) {doAjaxRequestHandler(context + "/getProducts", "GET", function(response) {$('#' + domId).html(response);});}