1. Home
  2. Computer Science MCQs
  3. Jquery
  4. Which jQuery method selects elements by class?

Added 16 Sep 2025

Which jQuery method selects elements by class?

  1. $("#class")
  2. $(".class") Correct answer
  3. $("class")
  4. $("<class>")

Correct answer

B. $(".class")

19 views

MCQSEXAM

Explanation

The $(".class") selector in jQuery selects all elements with the specified class.

Reference

Asked in: Web Development Exams

https://api.jquery.com/class-selector/

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Jquery MCQs

Practise all Jquery MCQs

Similar MCQs