From the course: jQuery for Web Designers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Enhance a shopping cart with animation

Enhance a shopping cart with animation - jQuery Tutorial

From the course: jQuery for Web Designers

Start my 1-month free trial

Enhance a shopping cart with animation

- [Voiceover] Now we're going to start working on a little project that's going to put together everything we've learned about jQuery so far, including animation, and it's going to culminate in a challenge at the end of the chapter. So here on H+ Sport, we're working with the shop page. We have our flavored waters... and we have a cart area over here that's just been sitting dormant. So what we're going to do is add a click handler to each of these items so that when we click it, it's going to be added to the cart. And we're going to animate that addition. The way it'll look is we'll make a little copy of the image here on each of these items, and we're going to send it over here into the cart, and it'll disappear when it gets there. That's the general idea, so let's dive right in. Here, in my text editor, I have the script file open with a little bit of starter code for you just so you don't have to write the click handler yourself. And then I have my index.html file, which we'll…

Contents