JavaScript Cookies Made Simpler with Cookies.js

JavaScript cookies have always been one of my least favourite things to work with. They always seemed more trouble than they were worth, and most of the time I found it a better solution to opt for things like localstorage, and sessionstorage. Of course, cookies do have one huge advantage »

JavaScript Copy and Cut Text from HTML Inputs

While a lot of clipboard events require more complex functionality, and in some cases flash. JavaScript copy and cut functionality can be added to text inputs using document.execCommand(event). This is a widely supported solution. In effect, what it's actually doing is the same action as highlighting the content »

The Artwork Of JavaScript

JavaScript is an essential tool for web design and development. What it's not as well known for is creating artwork, but that's exactly what it can be used for. In this article I'm going to through 3 different resources out there that generate abstract / geometric artwork almost instantly and at »

jQuery setInterval and clearInterval | Stop After Seconds

When you're using jQuery, if you want to make run a function every set number of seconds or milliseconds the JavaScript setInterval is the perfect solution. Naturally it's not advisable to use too many on a page as there are some associated performance issues with running a something repeatedly. The »

Regex Cheatsheet with Examples

This regex cheatsheet has been created to help you get started with regex in both PHP and JavaScript. I know from experience that it can be confusing with the seemingly random string of letters and symbols without an obvious meaning. That's why I decided to create this short cheatsheet to »

Select a Random Item From an Array and Remove It

To select a random item From an array, and then removing that value is something that's useful to know with JavaScript. After all, arrays are at the core of JavaScript, and there barely seems to be a day that goes by when I don't use them in some way. Typically »

jQuery / JavaScript Refresh Page

Refreshing a page using JavaScript is something that isn't going to be needed often, but it can be useful as a callback function on Ajax Requests, or other functions where data needs updating. It is something that can be achieved using a single line of JS: location.reload(); This works »