Subversion Repositories SmartDukaan

Rev

Rev 26493 | Rev 26744 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
26493 tejbeer 1
$(function() {
2
	$(".product-detail").live('click', function() {
3
		loadItems("main-content");
4
	});
5
	$(".product-info").live(
6
			'click',
7
			function() {
8
				console.log(itemCatalogId);
9
				doAjaxRequestHandler(context + "/getProductInfo?catalogId="
10
						+ itemCatalogId, "GET", function(response) {
11
					$('.product-info-container').html(response);
26512 amit.gupta 12
					$("#compareItem").hide();
26493 tejbeer 13
				});
14
			});
15
 
26512 amit.gupta 16
	$(".compare-with").live('click', function() {
17
		$("#compareItem").show();
26493 tejbeer 18
	});
19
 
20
	$(".product-compare-info").live(
21
			'click',
22
			function() {
26512 amit.gupta 23
				catalogIds = [1021975, 1022020];
24
				if(typeof compareCatalogId!="undefined") {
25
					catalogIds.push(compareCatalogId);
26
				}
26493 tejbeer 27
				doAjaxRequestHandler(context
26512 amit.gupta 28
						+ "/getProductCompareInfo?catalogIds=" + catalogIds.join(","), "GET",
26493 tejbeer 29
						function(response) {
30
					console.log(response)
31
							$('#' + "main-content").html(response);
32
						});
33
			});
34
});
35
 
36
function loadItems(domId) {
37
	doAjaxRequestHandler(context + "/getProducts", "GET", function(response) {
38
		$('#' + domId).html(response);
39
	});
40
 
41
}