Skip to main content

All Questions

Tagged with
0 votes
1 answer
28 views

How do I make a toggle Panel not be open by default? the toggle is made on JavaScript within the HTML

So I've got a page in which the user can find a "?" toggle to read information on how to use the page. However, whenever the page loads (or reloads/refreshes) the toggle panel opens up (as ...
Ren's user avatar
  • 1
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 ...
Satyam Rai's user avatar
0 votes
2 answers
75 views

How can I select a child element, but separately in jQuery?

I've tried append ul into a div, but all ul append separately in div's. I want just child ul into div Loops selected all ul's into all div's separetly. <li class="first"> <a>...
Tolga's user avatar
  • 56
0 votes
0 answers
55 views

Visual Studio Code jQuery Selector Preview on Hover

When I hover on a CSS selector, I can see the preview of what it selects (below, first image). I'd like it to work on jQuery selectors as well. Is there a way? I searched through Stack Exchange ...
cagatay117's user avatar
2 votes
2 answers
309 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
-2 votes
2 answers
464 views

Unable to get menu item using querySelectorAll

I have the following code and tried getting the item "Menu 8", but here I am getting all menus, not just menu 8, I need to get menu8 and change the class name. What goes wrong with my code? ...
SmartestVEGA's user avatar
  • 8,761
-1 votes
1 answer
76 views

Getting second and third elements out of an ordered list using jQuery

We are trying to add a class and change the URL of the image of the second and third elements in an ordered list using jQuery. The ordered list cannot be changed into unordered list. We need a way to ...
user avatar
0 votes
1 answer
501 views

Running an if statement inside a querySelectorAll Node List

I am building a blog post layout which requires some metadata to sit on one side and stay in place as the content scrolls, using position: sticky. This works fine but some types of content stretch to ...
mtm's user avatar
  • 77
0 votes
1 answer
838 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
-1 votes
1 answer
327 views

keep on getting a "cannot read properties of null " when using style position in javascript [duplicate]

Im trying to recreate the brick breaker game from scratch but I cant seem to get this element to move. I open google chrome development tools and it tells me Uncaught TypeError: Cannot read properties ...
aguywithquestions's user avatar
0 votes
0 answers
88 views

Is there another way to get a HTML element in javascript other than querySelector and getElementId?

I'm trying to get a HTML element, a button, to my javascript file. I've tried .querySelector and .getElementById and my script file is attached at the bottom of my file just before the closing tag of ...
Betty smith's user avatar
0 votes
0 answers
70 views

document.querySelectorAll() not working for same class within an extra div

The script works and it adds the class "complete". window.addEventListener("scroll", function() { var scrollFadeClass = document.querySelectorAll(".scrollfade"); ...
daaaaaaaaaaaaaryl's user avatar
2 votes
1 answer
25 views

How to consolidate Jquery selectors for duplicate functions?

I have 9 "service node" divs in my HTML code, each with an hidden div and a button that can be clicked. When the button is clicked, it rotates 45 degrees and causes the hidden div to pop out....
Toph Hughes's user avatar
0 votes
0 answers
74 views

option group like horizontal menu

i have group option like this: <select name="cars" id="cars"> <optgroup label="Swedish Cars"> <option value="volvo">Volvo</option> <option value="saab"&...
Sina's user avatar
  • 37
0 votes
1 answer
115 views

How to simultaneously select adjacent element before and after it using jquery?

when i click on li.active the 2 adjacent elements before and after it are activated. class= active is not fixed it moves and repeats when it reaches the end element (I'm applying in slider) Please ...
Văn Quang Đỗ's user avatar

15 30 50 per page
1
2 3 4 5
37