I’m trying (and failing) to use “onScroll” on a div. All others commands are working properly. I already tried use only the onScroll and gave me nothing too. Why it isn’t working? Code: I added a second code to show the “onClick” working properly on “body”, but …
Tag: css
Do not execute JS if hovering over specific element
I have a custom cursor implemented and I do not want this cursor to be visible when hovering over the .header element. To achieve this, I’ve tried: However, that doesn’t work. Working demo below with my attempt commented out: Answer I would only attach the mouse move listener to sections. I have a…
Hide scroll and implement it with JS
I’m a beginner to HTML and JavaScript. I’m building a tabs bar, in which I want to have the option to scroll it horizontally, not with a traditional browser scroll, but with arrow buttons that I’ve created. Here is how my tabs bar looks like: This is the best I’ve managed to do: I mana…
How to get elements in order that are placed via translate3d
I am building a Chrome extension that interacts with Youtube comments visible on the screen in my Youtube backend. I want the extension to traverse the list of comments and highlight them one by one like so: I get the comments on the screen in the following way: and then maintain currentIndex to know at what …
I try to change the background color at on small app in html css js
I try to change the background color at on small app in html css js one snap of this is: Answer Remove the ( from the first of your string, And remove ; at the end. Change: To:
How to make a dropdown menu transition with CSS?
I have created a responsive navigation-bar/menu but I want it to appear with a sliding animation from the top to the bottom when the needed button is presed. The menu does appear on itself but it completely ignores the transitioni have set it to execute. I tried multiple methods – using webkit library, …
search text march Entire text
developers. I need help. I have given below the code. when I type anything in the search box typed value matches the beginning of a list item. But I want when I type anything in the search box typed value to match any part of the search item and the text color will be red. I try so many times
If parent div has specific class toggle another div using JS
How can I display a div if a parent div has a specific class using JS? In the code below I would like to display the div with class .hidden-gray only if parent div below has class .matched and child div has class .gray. And, the div with class .hidden-purple only if parent below div has class .matched and chi…
Hamburger icon css animation into an x
Im trying to make a hamburger icon turn into an x on click and then revert when clicking again. Ive got the animation set up i think but i need it to trigger on click rather than be constantley set. The ToggleNavLinks function is only used set an elements display to none unrelated to the hamburger icon. Menu …
Nav Element Disappears When Parents Element’s Position Changed to Sticky
I have a navbar div that has a title and a nav component. When the window gets small enough I collapse the nav element so have a burger to show and hide the nav element. Without changing the position attribute of the parent navbar div it works fine, however when I make the parent navbar div sticky I can no