Which jQuery method selects elements by class?
-
A
$("#class")
-
B
$(".class")
Correct answer
-
C
$("class")
-
D
$("<class>")
Correct answer
B. $(".class")
19 views
Explanation
The $(".class") selector in jQuery selects all elements with the specified class.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ