Question
Create a Rollover Plugin Starting with the downloadable assignment files, write the Javascript needed for the application. Use the book and lectures as a guide.
Create a Rollover Plugin Starting with the downloadable assignment files, write the Javascript needed for the application. Use the book and lectures as a guide. In this exercise, youll create a plugin that displays a different image when the mouse is rolled over an image in a list of images 1. Open the HTML and JavaScript files in the week 8 zip folder Run this application to observe how it works. 2. Review the code in the jquery.rollover.js file to see that it contains code for the standard plugin structure with the method name set to changeImage(). 3. Copy the code in the ready event handler of the rollover.js file into the each() method of the plugin. Then, modify the selector for the each() method in this copied code so its function is executed for each img element thats a descendant of the element that the changeImage() method is executed on. 4. Return to the rollover.js file, and replace the code in the ready event handler with a statement that calls the changeImage() method for the image_rollovers list. 5. Add a script element for the jquery.rollover.js file to the HTML file before the script element for the rollover.js file. The application should now run just like it did before.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started