Reputation: 348
I'm making a webshop and struggling a bit with jQuery.
When someone clicks the button to add a product, I want that product to fly over to the shopping cart (animated) but I really don't know how...
Here's the html:
<div id="shopping-cart">
<div class="product">Product</div>
<div class="product">Product</div>
<div class="product">Product</div>
<div class="product">Product</div>
So the functionality of jQuery would be someting like:
$('.product').click(function() {
$(this).flyTo('#shopping-cart');
})
Thanks!
Upvotes: 0
Views: 1563
Reputation: 433
You could use a jQuery script to "fly" it to a place on screen.
See an example here.
Upvotes: 2