What are Selectors in jQuery mean ?

 Posted by Chvrsri on 10/12/2011 | Category: jQuery Interview questions | Views: 5194 | Points: 40

Generally in HTML, if we need to work with any control on a web page we need to find the control. For that we use document.getElementByID or document.getElementByName. But in jquery we do it using Selectors.

Using this selectors we can select all the controls as well using a symbol (* )

A sample code snippet can be of this form

<script language="javascript" type="text/javascript">

$("*").css("border", "10px red");

This will make all the borders in the web page with a width of 10 pixel and color as red.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response