Skip to content

Perform Function when Element ID is Visible

I’m attempting to perform a function after an element ID becomes visible on a page. I want to make it so that when an element with the ID #discountbox becomes visible, then peform this function. This is the javascript I’ve created so far: Unfortunately, this does not appear to be working. Answer I…

Perform Function After Element Is Revealed

I’m working on a website where a div tag reveals itself after enough products are selected. What I’m trying to do is add an ID to this div tag after it’s revealed using javascript. This is the tag that’s revealed: This is the javascript I’ve created: Unfortunately, this does not …

How to change active class of the navbar on scroll

I tried every js code that I only could find, but nothing works, I don’t understand why, I checked console, no mistakes there. Maybe somebody can spot the mistake? Maybe I have to import some files or something else? Somehow code does not see the scroll, only when I click on the link. Is there a way to …

Convert NodeList to Array for a Stepper to work with IE

I want to create a simple Vanilla JS horizontal stepper without the addition of CSS or JS libraries. I have found this example but it doesnt work with IE browser. The problem is the following line: where he is converting the NodeList of ‘divs’ with class .bullet to Array. Is there any way to make …