Skip to content
Advertisement

Tag: ruby-on-rails

JavaScript countdown timer counting past zero

This might be a really simple thing to ask but I’ve got a JavaScript countdown timer, but I can’t stop it from counting past 0:00. Instead of stopping at this point, it will continue to -1:59 etc. I’d also like it to play a beeping sound (which can be found here) when the timer reaches zero. This is the code

Rails vuejs get height of iframe element

I am using vuejs with rails webpacker and turbolinks. I want to calculate the correct height of the iframe element on the initial page load. Currently, I am getting the height of the element when I manually refresh the page, and when someone navigates from any other pages to the page where the iframe element is located, the height of

Advertisement