Skip to content

Tag: javascript

traffic light sequence, html, javascript and css

I am trying to make a program that displays a traffic light sequence. I have made a mistake in the code so it doesn’t get past showing the red light when the “starts sequence” button is clicked. if you can see where I went wrong please help me get it working. I have used functions to change …

Use an image as a mask for another image

I’m making a website that I wanted to be a white page that you could stamp to make another image appear under. So when you click, you make a holepunch. Like this exemple : So I managed to have a randomized image in the background as I click which is fine for what I want, and to be able to

Use recursion on array [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Write a function that by given array of integers, and a positive number X,…

Multithreading with javascript promises

Just learning promises. Javascript is single threaded right? So when it uses fetch api to make http requests it all happens in one thread? How does it manage concurrency with PromisePool then? Then two then above cannot run on multiple threads right? Just in one thread? Thanks Answer Javascript is single thre…

Jquery click event not returning anything

My jquery is not alerting anything when I click the button with the id decrease. This is my code. I am using external js file. I tried doing this and it is working fine. This is the html code: what’s wrong with my first code snippet? Answer The value you pass to ready() needs to be a function. In your

JavaScript Show invisible divs on click

I ran into a problem that when I click on the button, it just flips the icon but only makes the invisible fields visible on the second click. Are there any idea how to do it? (Heres a gif to show my problem: https://ibb.co/cvz7pWC ) Also heres my code : Answer This could be to do with you not being

How to remove getbutton.io branding

If we use this free getbuttton.io widget then it shows getbutton.io branding so, is there any way to remove that branding using JS? Answer it will take like 2 seconds to load. so you can do something like this. you can increase 2sec to 5 if it takes more time to load.