Top "Jquery-selectors" questions

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

How can I select item with class within a DIV?

I have the following HTML: <div id="mydiv"> <div class="myclass"></div> </div&…

javascript jquery html class jquery-selectors
In jQuery how can I set "top,left" properties of an element with position values relative to the parent and not the document?

.offset([coordinates]) method set the coordinates of an element but only relative to the document. Then how can I set …

jquery css jquery-selectors positioning css-position
How to check if an element does NOT have a specific class?

How do I check if there isn't a class. For example, I know how to check to see if it …

jquery jquery-selectors
Not class selector in jQuery

Is there a simple selector expression to not select elements with a specific class? <div class="first-foo" /> <…

javascript jquery jquery-selectors
Count immediate child div elements using jQuery

I have the following HTML node structure: <div id="foo"> <div id="bar"></div> &…

javascript jquery dom jquery-selectors
jQuery Selector: Id Ends With?

Is there a selector that I can query for elements with an ID that ends with a given string? Say …

jquery jquery-selectors
jQuery: select an element's class and id at the same time?

I've got some links that I want to select class and id at the same time. This is because I've …

jquery dom jquery-selectors css-selectors
How do you check if a selector matches something in jQuery?

In Mootools, I'd just run if ($('target')) { ... }. Does if ($('#target')) { ... } in jQuery work the same way?

javascript jquery jquery-selectors
jQuery delete all table rows except first

Using jQuery, how do I delete all rows in a table except the first? This is my first attempt at …

jquery jquery-selectors
Get second child using jQuery

$(t).html() returns <td>test1</td><td>test2</td> I want to …

jquery jquery-selectors