All Questions
Tagged with jquery-selectors jquery
8,303
questions
0
votes
1
answer
28
views
Finding closest input in same cell multiple spans
I am having a hard time getting the closest input to the button clicked. Everything is on the same table cell. The button is inside a span and the input is inside 3 level span? Please see for ...
0
votes
1
answer
23
views
Error when using jQuery selectors pulled from a JSON configuration
I have a JSON object with jQuery selectors and values inside it. Special characters inside the selectors have (I think) been properly escaped. Here is what the JSON looks like:
var config = [{
&...
0
votes
0
answers
81
views
How can I press Tab key and Enter key on browser using browser's console?
I want to press 2 buttons on the website one by one (by console code) but the click code doesn't work on one of them.
So instead, I am trying to make console code that presses Tab key and Enter key ...
1
vote
2
answers
48
views
Contains to return multiple values
I am using $('label:contains('something'); to get the label that contains 'something' in it
it works perfectly fine but I want to be able to handle more than one label how to do it
example:
HTML:
<...
0
votes
0
answers
38
views
Can't get value from child element using JQuery [duplicate]
I am trying to get the value of the third <p> element by referring to the id of its parent (id="pickup-searchbox"), but first I'm referring to the class of the first chid (class="...
-1
votes
2
answers
115
views
Iterate Form with queryselectorall to put input value into array
I Have an html page and function is JS
I noticed that myForms is a NodeList with two elements, form is 0 or 1, How do I retrieve the input values for each form?
I also tried with
var query = '' + ...
0
votes
1
answer
18
views
Active class for single class element jQuery
I have these buttons which are actually p elements in a grid and they all have the same class. I would like to change the color of the p element which the user clicks on. How can I add an active class ...
0
votes
1
answer
26
views
Why this jQuery selector does not work for me?
I am trying to start an action everytime anything on the webpage else than specific object is clicked (menu "tree horizontal lines" button with class called "navbutton"), like this:...
1
vote
1
answer
41
views
jQuery next Input in table
I have a series of input and select elements in a table:
<table id='tbl-edit-company' class='tbl-form tbl-contact-form'>
<tbody>
<tr>
<td><...
0
votes
1
answer
29
views
Targeting child elements belonging to a specific class using JQuery :nth-child(n) selector
I am trying to apply some CSS classes on a specific html button using JQuery. The button that I am trying to target is the 2nd button in the #left-well div. All the buttons in my html have the class ...
0
votes
1
answer
16
views
jQuery selector for setting a value of an input based on the current context
I have several inputs that I would like to offer the same jQuery Autocomplete function on.
When the user selects an option, I would like to set the value of the corresponding text box to the id of the ...
-1
votes
1
answer
59
views
How to select multiple individual table columns with jQuery?
Currently, my jQuery selector for selecting the 2nd and 7th column is:
$("table tr td:nth-child(2) span:contains('something'), table tr td:nth-child(7) span:contains('something')")
Is there ...
0
votes
1
answer
432
views
Clone select2 element in current version (4.0.13)
The essence of what I’m trying to do is already asked & answered here in this SO question. That question includes a fiddle and code that works in an prior release of select2 (v3.3.2), but does not ...
0
votes
1
answer
470
views
Tampermonkey script does not see shadow-root (open) elements loaded by ajax
I am attempting to write a Tampermonkey script in Chrome for a website that I use all the time at work. I want the script to remove the disabled attribute on buttons of a certain class or title. This ...
0
votes
1
answer
100
views
Get URL from ahref using Javascript
<a href="#url" data-mc-cta="1" style="display:none">Link</a>
In this above a href code, a random URL will be generated by advertising network javascript ...