Tuesday 23 July 2013

What are the Type Selectors in Jquery

1.JQUERY TYPE SELECTORS
input[type="text"].css(‘color’,’blue’);      //jquery Text selectors
$('textarea') .css(‘color’,’blue’);                //jquery TextAreaSelectors
input[type="hidden"].val();                       //jquery Hidden Selectors
input[type="password"]                         //jquery password selctors
$('select')     // jQuery dropdown selector
input[type="radio"]  //jQuery Radio Selectors
input[type="checkbox"]  //jQuery checkbox selector
$('image')  //jQuery image selector

input[type="button"]  //jQuery button selector
2.  JQUERY ID SELECTORS
$("#ID")     //Select any elements by ID (#) denotes ID
3. Jquery Class Selectors
 $(“.classname")   //Select any elements by class name ( . ) denotes Class
4. Attribute Exist selectors
$([attribute name])    //select all elements in a page which have a specific attribute.
Ex.   $("[border]").css(‘color’,’red’);