SimpleCart Customization
SimpleCart Customization
- /* PRODUCT DATA */
var bunny = [ 'name=baby lion', 'price=34.95','size=tiny','quantity=1','thumb=e.png' ];
/* ADD TO CART ON HOVER */
$('#allcards .singlecard').hover(function() {
var card_id = $(this).attr("id");
simpleCart.add(card_id);
});
Hello!
I'm trying to implement a custom version of the simpleCart script and I'm having a small problem...
When you hover over a div with a class of .singlecard, the script should find that div's unique id (in this case the div's ID is 'bunny') and pass the corresponding array to the the simpleCart. Right now, the script is finding each elements ID correctly, but it isn't passing the corresponding array to the simpleCart.
What should i put where is says 'HERE' to pass the 'bunny' string through to the cart?
simpleCart.add(HERE);
Thanks!