Skip to content

Tag: html

onScroll isn’t firing any action (HTML)

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 …

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…

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…

input type number – max value

I have an input However, if the user write manually for example 200, the input accept it. Is it something normal ? I can validate the entry with javascript but if there is a build in in the html input it would be great 🙂 Thanks Answer I don’t think there is a solution directly with HTML; the max and