Monday, May 16, 2022
This JavaScript snippet will extract a price from a DOM element, remove all alphanumeric characters, such as currency or symbols…
Tuesday, December 5, 2023
Here are 3 methods to hide an element using JavaScript. How to hide an element using JavaScript? Set native display…
Monday, May 16, 2022
Here’s a short tutorial on how to create a programmatic JavaScript tooltip. I needed this feature to recreate a product…
Tuesday, May 17, 2022
There’s an increasing trend of adding full-width (possibly full-height) YouTube video covers with autoplay. Using the YouTube Iframe API, this…
Monday, May 16, 2022
The latest Chrome version has stopped video autoplay if the video is not muted. Firefox and the other browsers will soon…
Monday, May 16, 2022
Modern browsers allow you to define native dragging & dropping functionality with a graceful degradation for older/ancient browsers, such as…
Monday, May 16, 2022
I recently developed a simple tab strip using only HTML, CSS, and vanilla JavaScript. The script does not require any…
Monday, May 16, 2022
This is a reliable way of checking for DOM ready. The first version uses a procedural function, while the second…
Tuesday, August 20, 2024
DragonflyJS is a tiny vanilla JavaScript library that enables sorting (dragging and dropping) functionality with zero dependencies.
Monday, May 16, 2022
If you use jQuery for a handful of effects/animations, here’s a quick JavaScript replacement for jQuery slideToggle(). With small changes,…
Monday, May 16, 2022
The script below will check for a localStorage variable, which is the explicit user consent. If the variable exists, the…
Wednesday, May 8, 2024
RoarJS is a wonderful, responsive, customisable, accessible (WAI-ARIA), zero-dependency, vanilla JavaScript alert/confirm replacement. RoarJS automatically centers itself on the page…