Subversion Repositories SmartDukaan

Rev

Rev 27184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27184 Rev 27754
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
	$(".product-detail").live('click', function() {
2
	$(document).on('click', ".product-detail", function() {
3
		loadItems("main-content");
3
		loadItems("main-content");
4
	});
4
	});
5
	$(".product-info").live(
5
	$(".product-info").live(
6
			'click',
6
			'click',
7
			function() {
7
			function() {
Line 11... Line 11...
11
					$('.product-info-container').html(response);
11
					$('.product-info-container').html(response);
12
					$("#compareItem").hide();
12
					$("#compareItem").hide();
13
				});
13
				});
14
			});
14
			});
15
 
15
 
16
	$(".compare-with").live('click', function() {
16
	$(document).on('click', ".compare-with", function() {
17
		$("#compareItem").show();
17
		$("#compareItem").show();
18
	});
18
	});
19
 
19
 
20
	catalogIds = [1021975, 1022020];
20
	catalogIds = [1021975, 1022020];
21
	$(".product-compare-info").live('click',function() {
21
	$(document).on('click', ".product-compare-info",function() {
22
		changedIndex = $(this).closest('th').index()-1;
22
		changedIndex = $(this).closest('th').index()-1;
23
		if(typeof compareCatalogId!="undefined") {
23
		if(typeof compareCatalogId!="undefined") {
24
			//always push to last
24
			//always push to last
25
			if(changedIndex==-2) {
25
			if(changedIndex==-2) {
26
				catalogIds[2] = compareCatalogId;
26
				catalogIds[2] = compareCatalogId;
Line 32... Line 32...
32
		function(response) {
32
		function(response) {
33
			console.log(response)
33
			console.log(response)
34
			$('#' + "main-content").html(response);
34
			$('#' + "main-content").html(response);
35
		});
35
		});
36
	});
36
	});
37
	$(".catalog_items").live('click',function() {
37
	$(document).on('click', ".catalog_items",function() {
38
		doAjaxRequestHandler(`${context}/catalog-item`, "GET",function(response) {
38
		doAjaxRequestHandler(`${context}/catalog-item`, "GET",function(response) {
39
			$('#' + "main-content").html(response);
39
			$('#' + "main-content").html(response);
40
		});
40
		});
41
	});
41
	});
42
});
42
});