Currently browsing JavaScript

Friday, June 3, 2022

How to create a simple JavaScript percentage graph (or chart)

This small JavaScript snippet creates percentage graphs out of raw (array) data. Just input the name/value pairs of the involved…

Friday, June 3, 2022

JavaScript shortcuts for TRUE and FALSE

Here’s a neat trick if you’re into micro-optimization. JavaScript compressors and minifiers are used to make JavaScript code smaller and,…

Thursday, January 26, 2023

How to create time constants in JavaScript in a performant way

A recent project of mine required time constants, and instead of opting for an additional library for just 10 or…

Monday, May 16, 2022

How to create a minimal JavaScript slider with CSS transitions

A JavaScript Slider in 8 Lines In this post we’ll build a minimal JavaScript slider, with no dependencies. The smallest,…

Thursday, March 24, 2022

Canvas: Strange, Creepy Cables

A while ago I was playing with some basic trees drawn in Canvas using JavaScript. The longer I played, the…

Friday, May 20, 2022

Canvas: Pathfinding

Breadth First Search (BFS) Algorythm Breadth First Search (BFS) is an algorithm for traversing an unweighted Graph or a Tree. BFS…

Monday, May 23, 2022

Canvas: Circles & Optical Illusions

Here is another experiment in my Canvas series. This time, I have 2 sets of circles being generated, one set…

Monday, May 23, 2022

Canvas: 2D Waves

This is the second Canvas visualization I’m experimenting with. The first one was a Julia fractal animation. Here’s some simple…

Monday, May 23, 2022

Canvas: Julia Fractal Animation

While working on my Canvas Bots project, I experimented a lot with Canvas generative art. There’s a lot of potential…

Monday, May 16, 2022

Vanilla JavaScript table date sorting

Say we have a table with dates, in the following format: We want to sort this table dynamically based on…

Monday, September 4, 2023

Tiny confirmation modal dialog in Vanilla JavaScript

A new addition to my Thin UI library, a much-needed modal dialog, this script is tiny, and it works with…

Monday, May 16, 2022

How to add a top bar countdown for your next product sale

You can (probably) see this top bar right now, with a nice 30% off sale for my WordPress Lighthouse plugin.…