Skip to content
Advertisement

Tag: function

Close Elementor Popup with JavaScript

I have a popup created with Elementor that plays a video when opened. I am trying to get it to close after the video if finished (say 90 seconds), but I can’t find how to close an element or Popup with Javascript. I have tried something like this https://github.com/elementor/elementor/issues/7085, but as it’s not a click action, just a wait and

How to add 5 random numbers which are less than 10?

I’ve created two functions. One to create 5 random numbers to push them into an array. And another one to sum up the numbers. The random number generator is working and making an array perfectly. But the sum is not accurate. I’m unable to find where the problem is. Answer Because you are logging a different set of array values

why my last.addEventListener(“click”,nextLevel) not working?

https://codepen.io/demi-chen/pen/RwGPgxv I try to find the lastElementChild in the first div. It does show …… after I use console.log to check. why the addEventListener not working. I click the lastElementChild smile.png face but it’s not working. if function nextLevel() is working. the left&right side should add more smile.png. Tks! Answer its quite a simple fix really change your nextlevel to

Advertisement