Currently browsing JavaScript

Thursday, May 9, 2024

SEO Crawlability Issue: Resources are formatted as page link

While working on a SEMrush audit, I found a new type of crawlability notice: 47 resources are formatted as page link…

Friday, July 12, 2024

StackGrid — A Light Vanilla JavaScript Masonry Grid

Introducing the lightest and most efficient Masonry grid available — StackGrid — powered by pure vanilla JavaScript, no dependencies required.…

Tuesday, December 27, 2022

How to Open Only One Details/Summary Element at a Time

Let’s suppose you want to build a simple accordion or a help section, and you want to use a <details>…

Tuesday, December 27, 2022

Canvas – A Simple Drawing Application

This is a simple drawing application that allows the user to select a colour and thickness for their brush and…

Monday, August 29, 2022

Code Golfing Tips & Tricks: How to Minify your JavaScript Code

JavaScript golfing is the process of writing the smallest amount of JavaScript code to do something awesome.

Tuesday, August 9, 2022

The Complete JavaScript Strings Reference

JavaScript strings are deceptively complex constructs. There are actually two different types of strings – string Literals and string Objects…

Thursday, August 4, 2022

How to code your own JavaScript de-duplicator

I have a new tool on getButterfly: a data de-duplicator for emails, URLs, IDs, names and more. It's written in…

Monday, July 4, 2022

JavaScript Form Validation

This JavaScript code snippet adds inline validation to any form field (input, select and textarea). Feel free to customise it…

Saturday, December 2, 2023

How to get content from another website using JavaScript

Here’s the scenario: One of my websites is static, and I need to maintain a changelog both on the website…

Tuesday, May 7, 2024

Why I removed my dark theme switcher

How I implemented a dark/light theme switcher using JavaScript and CSS for both WordPress and static websites.

Friday, June 3, 2022

JavaScript Bookmarklets Collection

Bookmarklet 1: Show Password A simple JavaScript snippet can be used to view passwords in web browsers. To use the code,…

Tuesday, May 2, 2023

How to copy web page content using innerHTML

I need to extract some data from a web page and place it on a fishing site. The source web…

Page 3/12‹ Previous1234567Next ›Last »