Quantcast
Channel: 9zap.com » CSS
Viewing all articles
Browse latest Browse all 10

How to select CSS elements in jQuery

$
0
0

jquery_logo
jQuery let you select CSS elements and perform some action on that CSS element. Selecting a CSS elements in jQuery is very easy. Just wrap the CSS element in $(“”)
You can also use single quota, like $(”)

1. Select all div elements.

$("div");

2. Selects HTML element with ID “somename”

$("#somename");

3. Selects HTML element with class “classname”

$(".classname");

Similarly you can select different types of element in jQuery. It support CSS1, CSS2 and CSS3


Viewing all articles
Browse latest Browse all 10

Trending Articles