Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions JQuery-Selecting class or ID

Have Programming Question? Ask it here!
 
 
 


BikrantSingh
JQuery-Selecting class or ID
1 Answer(s)      3 years and 9 months ago
Posted in : JavaScript Questions


Hi Guys, I am new to JQuery. I am getting little trouble in selecting an item using class or ID in jQuery?


Advertisement
View Answers

December 4, 2010 at 5:21 PM


Given below code selects an element of id name "element1" :

$('#element1')

Since IDs are unique, so it will select only the element of particular id. Given below code select the elements having particular class name as mention by you :

$('.myClass')

In this case "myClass" is the css class name. The selected elements can have one or more elements.



Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com