Question
Modify code 1. In the JavaScript file, add an event handler for the ready() event method. (Check out how Onload() and document.ready() differs: https://api.jquery.com/load-event/; https://learn.jquery.com/using-jquery-core/document-ready/
Modify code
1. In the JavaScript file, add an event handler for the ready() event method. (Check out how Onload() and document.ready() differs: https://api.jquery.com/load-event/; https://learn.jquery.com/using-jquery-core/document-ready/ )
2. Use the each() method to run a function for each element in the unordered list of items. Then, add jQuery code that gets the URL and id for each image and preloads the image. You can get the URL from the href attribute of the element, and you can get the caption from the id attribute.
3. Add an event handler for the click event of each link. The function for this event handler should accept a parameter named evt. The jQuery code for this event handler should display the image and caption for the link that was clicked. In addition, it should use the evt parameter to cancel the default action of the link.
4. Add a jQuery statement that moves the focus to the second link on the page when the page is loaded.
5. Verify there are no errors.
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