Question: Question 1. S how the correct jQuery code for each of the following UI tasks: a) Select all elements with class=name and give each of

Question 1.

Show the correct jQuery code for each of the following UI tasks:

a) Select all elements with class="name" and give each of them a unique id in the form "name-0", "name-1", "name-2" and so on

b) Anytime an element with class="trackClick" is clicked (using the "click" event), output the text "element clicked" to the console (using console.log()). This must work for all present and future elements with the class "trackClick".

Question 2.

Assume that there is only one

in the DOM tree and the table hast at least one row with five columns. Write down a small JavaScript code fragment to add one row to this table.

Question 3.

Write a JavaScript function that deletes all tags from the screen.

Question 4.

Develop a JavaScript function that takes a DOM element as argument and reverses the order of its children, i.e. first child becomes last child, second child becomes one before last child, etc.

Question 5.

Consider the following code fragment:

Write a piece of code in JavaScript to remove all the styles from the web-page.

Question 6.

Write down a JavaScript expression to remove all the rows of a

. Assume that there is ONLY one table in the page and that the table has at least one row with at least one column (the exact number of columns is unknown to us).

Question 7.

Develop a JavaScript function that takes a DOM element as argument and reverses the order of its children, i.e. first child becomes last child, second child becomes one before last child, etc. (This question in duplicated from Test Two)

Question 8.

In the following code fragment, modify the style of the paragraph text using JavaScript code. Clicking on the button the font size and color of the paragraph text will be changed.

 Question 1. Show the correct jQuery code for each of the

Question 9.

Look at the following code fragment. Write a JavaScript program to removes items from a dropdown list one at a time.

Question 10.

Write down a JavaScript code that turns the color of all

tags to Red.

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!