Subversion Repositories SmartDukaan

Rev

Rev 26512 | Go to most recent revision | Details | 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);
12
					$("#campareItem").hide();
13
				});
14
			});
15
 
16
	$(".campare-with").live('click', function() {
17
		$("#campareItem").show();
18
	});
19
 
20
	$(".product-compare-info").live(
21
			'click',
22
			function() {
23
				doAjaxRequestHandler(context
24
						+ "/getProductCompareInfo?catalogId=" + itemCatalogId
25
						+ "&catalogId=" + campareItemCatalogId, "GET",
26
						function(response) {
27
					console.log(response)
28
							$('#' + "main-content").html(response);
29
						});
30
			});
31
});
32
 
33
function loadItems(domId) {
34
	doAjaxRequestHandler(context + "/getProducts", "GET", function(response) {
35
		$('#' + domId).html(response);
36
	});
37
 
38
}