Skip to content

Latest commit

 

History

History

quiz02

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Quiz 2: JQuery Selectors

In this quize, you are expected to process the web page https://jquery.com using jquery:

  • [1] select all the <p> elements.
  • [2] select the element whose id is container.
  • [3] select the element(s) whose class is constrain.
  • [4] select the first <div> element.
  • [5] select the last <nav> element.
  • [6] select all elements contains the content/text "jQuery".
  • [7] select all <a> element under a <li> element.
  • [8] hide all <a> elements.
  • [9] when the mouse hover any <a> element, show the text/content of the <a> element in an alert window. To answer this question, you need to write several lines of code. Please recall how to bind a function to a specific event of an element. For example bind a click event to an element whose id is map.
$("#map").on("click", function(e) {
     //put your codes here.
})
  • [10] "hack" the page by changing all the text/content "JQuery" to "Anonymous".

For example, to select all the <a> elements, you can use $("a"). To complete this quiz, you will need to use the console drawer of the Chrome Inspector.

The total avaliable score for this quiz is 20 POINTS. Please answer all the questions in a word or pdf document, and submit it to canvas. The deadline of this quiz is Thursday (Feb 7, 2019) 11:59 pm.