---
title: "jquery selectors"  
description: "jquery selectors"  
author: "Amruta Kulkarni"  
published: 2018-05-10  
updated: 2018-06-06  
canonical: https://www.mindstick.com/forum/34484/jquery-selectors  
category: "jquery"  
tags: ["jquery selectors"]  
reading_time: 1 minute  

---

# jquery selectors

Why id &[amp](https://www.mindstick.com/forum/156207/what-is-amp); [elements](https://www.mindstick.com/forum/1440/wpf-button-with-multiple-text-elements) are [faster](https://yourviews.mindstick.com/story/1515/5-ways-to-get-in-shape-faster)? &

why [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) [selectors](https://www.mindstick.com/interview/22831/what-is-the-use-of-selectors-in-objective-c) are [slow](https://answers.mindstick.com/qa/50237/sometimes-the-web-browser-stops-responding-or-becomes-slow-and-will-show-you-the-message-that-the-web-browser-was-crashed-what-can-be-the-risks)?

## Replies

### Reply by Prakash nidhi Verma

jQuery selectors:

Demonstrate the different selectors in jQuery like elements, class, attribute etc.

Ex.

```
$("[href]")   // elements with href attribute
$(".mindstick")   // elements with class="mindstick"
$("#myname")   // elements with id="myname"
$("[title^='prakash']")   // elements with attribute which start with "prakash".
```

Id and elements are faster than class selector because id will be unique and it's only one time matched data with DOM's database than stoped , but when you uses class it's called many times from DB and it's performance will get slow.

Happy Coding :)


---

Original Source: https://www.mindstick.com/forum/34484/jquery-selectors

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
