Selectors that can be used in the jQuery JavaScript library to match a set of elements in a document. Most CSS selectors are implemented, as well as a set of custom selectors.

learn more… | top users | synonyms (1)

5
votes
3answers
27 views

what is the next after comma in $('.elem',elem)?

I'm using code like $('.elem',elem), $('.elem',elem).tabs(). $(".elem") is used to select elements with that class. But what is the next after comma? What is the use of it?
0
votes
0answers
20 views

Focus selector not work

Go into textfield and input a character. The debugger show you: $( document.activeElement ) => work, node found + attribute you can read $(":focus").css("background-color","red") => work $( ...
0
votes
2answers
34 views

First-child of Grandparent of an element JQuery

I've this html code : <table id="MaTable"> <tbody> <tr> <td>slip</td> <td></td> <td></td> ...
0
votes
0answers
18 views

Jquery selectmenu ignoring selected option when initializing

I am using the JQuery selectmenu, I Created a drop-down select menu with the following structure: <label for="of_area">Your option</label> <select name="of_area" id="of_area" ...
1
vote
3answers
37 views

How come selectors in $.fn.find() cannot reference the tree beyond the current $ scope?

In jQuery $('html head').length // 1 And $('html').find('head').length // 1 And $('html').find('head').filter('html head').length // 1 BUT ...
0
votes
2answers
22 views

Trouble using jquery.closest to pick out page element

'Kay apologies for whats probably going to be an easy question, and my hacky code too :P But I've been racking my brains and looking at the documentation for hours now and I'm going round in circles, ...
0
votes
1answer
37 views

Selector Issue with Parent Table

Given the following layout: <table class="questionitem" id="RichSurvey_1_Question1_QuestionTable_1"> <tbody> <tr> <td> <table ...
0
votes
5answers
38 views

javascript alternative for jquery element addressing

What is Javascript alternative for this: $('#clientDetailModal #heightValue') I need it because in my code this works: document.getElementById('heightValue').checkValidity() but this doesn't: ...
1
vote
3answers
47 views

jQuery selector performance issues

I have 3 queries about selector performance: First, is there any performance differences in the following statements: $('#content .someclass') and $('.someclass', '#content') I have always used the ...
1
vote
2answers
50 views

jquery selector of class who have specific node immediatly after

consider the following html: <div class="a"> pick me 1</div> <div class="b"> stuff </div> <div class="a"> stuff </div> <div class="a"> stuff ...
2
votes
2answers
127 views

Why does jQuery select the wrong element?

I have 2 jQuery select expressions: (1) $('html body table tbody tr td:nth-child(2) table tbody tr td table:nth-child(1) tbody tr:nth-child(2) td table tbody tr td:nth-child(2)') vs (2) $('html ...
6
votes
1answer
76 views

Jquery traversing and using selectors

I'm reading a book and they show a couple of examples of how to select elements on the DOM, but they advise to always use Jquery trasversing methods over the selectors, for example if you have a list ...
1
vote
1answer
33 views

Jquery: Get Body not descendant of iframe

I have an issue with a project of mine I'm developing a chrome extension that injects html code into a page, specifically I'm injecting a bootstrap modal that's triggered by a browser action. The ...
1
vote
2answers
73 views

JQuery - Remove specific element tags (but not the HTML) from within 'this'?

I have a table (with 2 columns) I want to convert into a list. So far I can wrap the trs in li tags eg: $('#table tr').each(function() { $(this).wrap('<li />'); }); But I was wondering if ...
1
vote
2answers
46 views

Trouble with attribute name as a selector [closed]

in my project, jQuery doesn't select the "clicked" element. Here is my current code: $(function() { $('[data-sample_attribute]').click(function() { alert("sample text"); }); }); I ...

1 2 3 4 5 372
15 30 50 per page