Top "Jquery-selectors" questions

Selectors can be used in jQuery to match a set of elements in a document.

jQuery hasClass() - check for more than one class

With: if(element.hasClass("class")) I can check for one class, but is there an easy way to check whether "…

jquery performance jquery-selectors
JQuery find first parent element with specific class prefix

I want to get the first parent which has a specific class prefix, suppose: <div class="div-a3332"> <…

jquery jquery-selectors
jQuery’s .bind() vs. .on()

I found two great articles talking about the new function .on(): jquery4u.com, elijahmanor.com. Is there any way …

javascript jquery jquery-selectors
jquery data selector

I need to select elements based on values stored in an element's .data() object. At a minimum, I'd like to …

jquery jquery-selectors
jQuery vs document.querySelectorAll

I heard several times that jQuery's strongest asset is the way it queries and manipulates elements in the DOM: you …

javascript jquery html css-selectors jquery-selectors
How to select last child element in jQuery?

How to select last child element in jQuery? Just the last child, not its descendants.

jquery jquery-selectors
jQuery function to get all unique elements from an array?

jQuery.unique lets you get unique elements of an array, but the docs say the function is mostly for internal …

javascript jquery jquery-selectors
jQuery or CSS selector to select all IDs that start with some string

How can I select all elements whose id starts with "player_"? I have multiple elements like this: <div id="…

jquery css jquery-selectors css-selectors
jQuery UI tabs. How to select a tab based on its id not based on index

I have two tabs and configured usign jQuery UI. ul class="tabs" li tabone li tabtwo ul dynamically from C# …

jquery jquery-ui jquery-plugins jquery-selectors
Combining a class selector and an attribute selector with jQuery

Is it possible to combine both a class selector and an attribute selector with jQuery? For example, given the following …

javascript jquery jquery-selectors