Subversion Repositories SmartDukaan

Rev

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

Rev 18406 Rev 18708
Line 358... Line 358...
358
		if (typeof(Storage) !== "undefined") {
358
		if (typeof(Storage) !== "undefined") {
359
			localStorage.removeItem("productdetail");
359
			localStorage.removeItem("productdetail");
360
			localStorage.setItem("productdetail", $(this).closest(".card").html());
360
			localStorage.setItem("productdetail", $(this).closest(".card").html());
361
		}
361
		}
362
		$('#loadingModal').modal();
362
		$('#loadingModal').modal();
-
 
363
		var call = apihost+"clicks/add/"+me+"/"+$(this).data('id')+'/'+$(this).data('source')+'/?url='+encodeURIComponent($(this).data('url'))+'&price='+$(this).data('price');
-
 
364
		$.ajax({
-
 
365
			url: call,
-
 
366
			// The name of the callback parameter, as specified by the YQL service
-
 
367
			jsonp: "callback",
-
 
368
			// Tell jQuery we're expecting JSONP
-
 
369
			dataType: "jsonp",
-
 
370
			// Tell YQL what we want and that we want JSON
-
 
371
			data: {
-
 
372
				format: "json"
-
 
373
			},
-
 
374
			// Work with the response
-
 
375
			success: function( response ) {
-
 
376
				console.log(response);
363
		
377
			}
-
 
378
			});
364
		var url = $(this).data('url');
379
		var url = $(this).data('url');
365
		
380
		
366
		window.location = url;
381
		window.location = url;
367
	});
382
	});
368
	
383