Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

2 votes
2 answers
311 views

jquery `.find()` use with `:not` selector is missing some elements (the selector is affected by the `.find()` invoking element, but it shouldnt)

problem I have an element $(elt_Main) (<span id="a">) I call $(elt_Main).find(selector); on it With a selector selector = ':not(span span)'; But jquery is not giving out all the child ...
Nor.Z's user avatar
  • 1,091
0 votes
1 answer
846 views

Select the last element that is not empty (innerText !== "") of a class with querySelector

I'm try to select the last element that is not empty of a class. For example, here I would like to select the second element: <span class="test">A</span> <span class="...
Myk Ado's user avatar
  • 63
-2 votes
1 answer
67 views

jquery does not show hidden div section with css

I'm using elementor to create a photo gallery that appears once the input button is clicked. My problem is that in the hidden div (css display:none) when I use show () or toggle () with jquery the ...
Mat Bre's user avatar
0 votes
0 answers
42 views

Why does changing an element through jQuery affect my media queries?

I am trying to create a Navigation bar that on mobile is transparent until you scroll past a certain point, but it switches back and forth through the use of a JavaScript function I'm using for the ...
Zach's user avatar
  • 1
0 votes
0 answers
23 views

How can I get host element of before selector? [duplicate]

I have a jQuery code like: $(".class::before").click(function(){ $(this).css("display","none"); }); This effects on that before element. But I want to access the host element. Please help!
Harun Ur Rashid's user avatar
2 votes
1 answer
134 views

CSS pseudo class selector :first - What is it? I found in sample code and can't find documentation on it

In some sample code here at w3schools the selector is: ul li:first I can't seem to find documentation on this usage of :first Here it makes only "Coffee" hide() and not "Coffee 2" as well. I'm brand ...
Jake Shepherd's user avatar
0 votes
2 answers
67 views

selecting and styling odd numbered portfolio items using jquery

I am attempting to reorder the module header and portfolio image of odd numbered portfolio items. You can view my sandbox here. I though the below might work, but no dice. jQuery(document).ready(...
Sarah Crawford's user avatar
1 vote
2 answers
37 views

How to select if has not an element

I would like that if the user clicks in a <td> of a <tr> that DOESN'T have an input element of type checkbox, it will call a function. Actually, I'm trying to do in this way: $(...
WitnessTruth's user avatar
0 votes
4 answers
143 views

How can I target next or sibling element in jquery or css?

I have an issue trying to target the next element in a men. Let's say we have this structure : <ul> <li class="active"> <a href=""><i class=""></i></a> </...
blogob's user avatar
  • 510
-3 votes
1 answer
199 views

Ajax code suddenly stopped working?

I'm losing my mind right now, I don't know what happened. I wrote a code where users could write a comment, and as soon as you submit it the comment shows up. Everything worked perfectly fine until, ...
Wargrave's user avatar
4 votes
3 answers
7k views

How to Scale Up a div on hover and Scale Down all other divs

I've been trying to figure this out forever now but without success. Below are 6 circular divs. When a user hovers over one of them, I want the hovered div to expand a bit (scale up) and all other ...
Cris's user avatar
  • 251
4 votes
1 answer
2k views

javascript querySelector not working with with ':not()' option [duplicate]

Hi there are something wrong with this selector document.querySelectorAll('img:not(img[src^="data"])'); I need to get all images which does not having a data url, my developer console saying that ...
Sajan's user avatar
  • 821
0 votes
3 answers
455 views

Select immediate sibling in CSS or jquery?

I am going round in circles but not able to find a precise logic for this. I have a following code: <form> <table></table> <div class="1"> </div> <div class="2">...
rkd's user avatar
  • 43
0 votes
1 answer
71 views

Using jQuery selector for css, escaping special characters

I'm trying to change the background color of a radio button with jQuery. I posted the css below, but in jQuery I need to escape the special characters (see below) and its still not working. #opt5 >...
SAS20's user avatar
  • 49
1 vote
1 answer
119 views

How to exclude inner webelement with css selectors?

I have this css selector: $("td.cv-table-panel-element") that returns a list of elements as it appears in the screenshot below: All these elements are columns of a table and each column content is ...
Eugene S's user avatar
  • 6,850

15 30 50 per page
1
2 3 4 5
8