FLASH SALE Get 20% OFF everything using the coupon code: FLASH20 View WordPress Plugins →

Currently browsing JavaScript DOM

Monday, May 16, 2022

How to Autoplay a Video Element Using JavaScript

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

Native JavaScript Drag&Drop Upload

Modern browsers allow you to define native dragging & dropping functionality with a graceful degradation for older/ancient browsers, such as…

Monday, May 16, 2022

Building a Simple Tab Strip using Vanilla JavaScript

I recently developed a simple tab strip using only HTML, CSS, and vanilla JavaScript. The script does not require any…

Monday, May 16, 2022

DOM ready functionality using vanilla JavaScript

This is a reliable way of checking for DOM ready. The first version uses a procedural function, while the second…

Monday, June 13, 2022

DragonflyJS – Vanilla JavaScript Drag and Drop

DragonflyJS is a tiny vanilla JavaScript library that enables sorting (dragging and dropping) functionality with zero dependencies.

Monday, May 16, 2022

How to Implement jQuery slideToggle() in Vanilla JavaScript

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

How to Create a GDPR Modal Popup Using RoarJS

The script below will check for a localStorage variable, which is the explicit user consent. If the variable exists, the…

Monday, June 13, 2022

RoarJS – JavaScript Alert/Confirm Replacement

RoarJS is a wonderful, responsive, customisable, accessible (WAI-ARIA), zero-dependency, vanilla JavaScript alert/confirm replacement. RoarJS automatically centers itself on the page…

Tuesday, May 17, 2022

In Case You Missed It – My CodePen Snippets, Experiments and Code Samples

This post is an assortment of JavaScript snippets, experiments and code samples created for various projects. They are pretty small…

Monday, May 16, 2022

How to Create an Internationalisation System Using JavaScript

Creating an i18n system in JavaScript can be tricky. The most popular option is to use global variables, but it…

Tuesday, October 24, 2023

Client-Side JavaScript Pagination

Server-side pagination is needed when you have to display hundreds of records. You may fetch results from a database using…

Monday, May 16, 2022

A Quick Introduction to Custom Data Attributes and Vanilla JavaScript

For years, developers have needed a method for adding their own metadata to HTML elements, but no standardized technique existed.…