jQuery Selectors

Introduction

jQuery Selector is used to select HTML element, based on its id, class, element, attribute and so on. Selectors can be simple or nested.

Simple jQuery element selector:

$(“p”)


Simple jQuery id selector:

$(“#content”)

Simple jQuery class selector:

$(“.mainDiv”)

Example code

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.