1.

What is the correct syntax of jQuery?(a) action().$(selector)(b) $(selector).action()(c) (selector)$.action()(d) action().(selector)$This question was posed to me in an interview for internship.This intriguing question comes from Essential JavaScript and jQuery in section HTML Tables, Javascript & Jquery Basics of HTML

Answer»

The correct option is (B) $(selector).ACTION()

Explanation: The basic syntax of jQuery is $(selector).action(), $ sign defines access of jQuery, (selector) is HTML element, action() is for the jQuery action that is to be PERFORMED. E.g. $(“h1”).hide(), this will hide all the

ELEMENTS.



Discussion

No Comment Found

Related InterviewSolutions