jQuery 4 Hands-on - Animations
jQuery > jQuery Tutorial > jQuery Animation
240
Answer:
1. jQuery 4 Hands-on - Animations
In function hover1(), add slideToggle() actions to the div tags ID #item1-des.
In function hover2(), add slideToggle() actions to the div tags ID #item2-des.
In function animate_big(), add the animate() action to the button ID #buy, which will change the width to 200px.
In function animate_small(), add the animate() action to the button ID #buy, which will change the width to 100px.
Solutions
index.htmlscript.js
BrandPrice
Some Description 1BrandPrice
Some Description 2
Functions which need to be utilized.
script.jsfunction hover1(){ }; function hover2(){ }; function animate_big(){ }; function animate_small(){ };
Here's the updated code with the slideToggle() actions in the hover1() and hover2() functions, and the animate() action in animate_big() and animate_small():
function hover1(){ $("#item1-des").slideToggle(); }; function hover2(){ $("#item2-des").slideToggle(); }; function animate_big(){ $("#buy").animate({width: "200px"}); }; function animate_small(){ $("#buy").animate({width: "100px"}); };
This Particular section is dedicated to Question & Answer only. If you want learn more about jQuery. Then you can visit below links to get more depth on this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.