Selectors in jquery

By | December 4, 2014

Selectors in jquery start with $ sign followed by ()

Different type of selectors

1. Element selector- it selects elements based on elements name

For example $(“p”)

2. Id Selector– to select single element we will use this selector

Example- $(#myid)

3. Class selector- to select a element with specific class

Example-$(“.test”);

Below example will define all the selectors in a single function