$(".to-cart").on("click",function(){
id = $(this).attr("for");
$("#product"+id)
.clone()
.css({'position' : 'absolute', 'z-index' : '11100', top: $(this).offset().top-300, left:$(this).offset().left-100})
.appendTo("body")
.animate({opacity: 0.05,
left: $(".cart-text").offset()['left'],
top: $(".cart-text").offset()['top'],
width: 20}, 1000, function() {
$(this).remove();
});
});
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.