You should create a Javascript file called jQueryTest.js locally to the HTML file jQueryTest.html - all code should be in this file. Do not edit this HTML document.
- On page load, hide
#button2,#button3, and#cat - Make
#button1when clicked display#button2 - Make
#button2when clicked display#button3 - Make
#button3when clicked display#cat - Make
#button4when clicked hide#button2,#button3, and#cat
- Add the attribute
disabledto buttons when they have been clicked. - When
#button4is clicked, ensure all buttons are re-enabled again.
- When buttons appear, make them fade in instead of instantly appear.
- When
#catappears, make it slide down instead of instantly appear. - When
#button4is clicked, make#catslide up, and#button2/#button3fade out.
- When
#catslides down, make the slide down animate slower. - When
#button4is clicked, make#catslide up first, only once hidden, then fade out#button3, and again once hidden, only then fade out#button2.
- When the image of the cat is clicked, change the image to another cat - do NOT set an ID to the image.
- Create an array of 5 cat image URL's.
- When the cat is clicked, slide up the cat, and slide down a random new image of a cat from your array - this can be called unlimited times.
- 5 seconds after
#button3is clicked, dynamically (in jQuery) add a new button after #button4 with the id#button5with the value "I prefer dogs" - When
#button5is clicked, slide up the cat image and slide down a random dog image.