Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

Find dy/dx for the following functions. y = sin x + cos x

Answered: 1 week ago