Question: Write the jQuery code for to wire up the following events, making sure to only execute the code once the DOM is considered ready: a)

Write the jQuery code for to wire up the following events, making sure to only execute the code once the DOM is considered "ready": 

a) Anytime a

element with class="click-counter" is clicked (using the "click" event), append the text "clicked" to the clicked element (HINT: the clicked element can be accessed using $(this)). This must work for all present and future
elements with the class "click-counter". 

b) When a

element with id="studentForm" is submitted, output the value of the selected "residence" (implemented using a radio button with name "residence") to the console. NOTE: The form must not proceed to submit using the regular method. 

c) Select all paragraphs with class="pars" and give each of them a unique text in the form "Day-0", "Day-1", "Day-2"... and so on.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!