Currently browsing JavaScript

Tuesday, August 2, 2022

How to Create a Price Range Slider Using Vanilla JavaScript

All JavaScript range sliders are hacks or workarounds. Because there’s no native HTML element for a range slider (only a…

Monday, May 16, 2022

How to Create a JavaScript Typewriter Using Vanilla JavaScript

This was done for a client, and I do not recommend it as it uses setTimeout(). Anything using setTimeout() or…

Monday, May 16, 2022

JSONify Dropdown Element Using Vanilla JavaScript

This function converts a regular <select> element both into an intented ul/li structure and JSON. It’s light and it’s been…

Tuesday, June 18, 2024

Drift Chat: Speed Up Your Page Loading Speed by 3-4 Seconds

Here’s a neat trick to speed up your initial page loading time when you are using Drift. If you use…

Wednesday, January 18, 2023

24-Hour Countdown with Progress Saving Using Vanilla JavaScript

Here’s an interesting JavaScript snippet allowing you to set a 24-hour countdown and save its progress between page loads.

Monday, May 16, 2022

How to Draw on Canvas and Save the Result Using Vanilla JavaScript

This was part of a complex drawing project, which is not relevant right now. The idea was to have a…

Monday, May 16, 2022

Date Countdown Using Vanilla JavaScript

A while ago, I coded several date countdowns for several promotions. These countdowns went straight inside a third-party popup solution,…

Thursday, November 2, 2023

Random Imgur Images Using Vanilla JavaScript

I found this old code I used for an old forum a long time ago, and I decided to bring…

Monday, May 16, 2022

How to Add the Facebook Messenger Customer Chat to Your Site Using Google Tag Manager

Google Tag Manager is using its own Closure Compiler behind the scenes to compress the JavaScript and HTML code. It…

Monday, June 13, 2022

How and why I added a circle following my mouse pointer

I’ve seen this behaviour on several Russian sites, and it looked really slick, especially when the movement was delayed compared…

Monday, May 16, 2022

Switching From JavaScript to PHP for Browser Detection and Avoiding Core Web Vitals Penalties

In the light of the recently introduced Core Web Vitals, I decided to save some script start-up speed and switch…

Thursday, June 23, 2022

Experiment: JavaScript Boxed Carousel with Progress Indicator

Here's an awesome JavaScript carousel built for a client project, but then scrapped. It definitely has potential for unlimited items.…