Month: October 2016

Event Delegation with jQuery

It surprises me how many developers are unaware of – or ignorant of – event delegation within JavaScript and jQuery events. Sometimes when developing a site or application we need to attach an event handler to multiple elements, and those elements may or may not be in the DOM when it’s initially loaded (AJAX loaded content […]


grunt-sass vs grunt-contrib-sass

If you use grunt-contrib-sass to compile your SCSS code into CSS I recommend taking a look at grunt-sass. It can be used as an drop in replacement for grunt-contrib-sass but with one major difference: speed. grunt-contrib-sassuses a Sass compiler written in Ruby. It works just fine for projects where you don’t have a lot of […]


PHP and Numerical Strings

Take a look at the following two combinations of letters and numbers that make up product codes for a particular company: 608E-4234 272E-3063 To you and I, they look completely different right? I mean the only thing they have in common is their length and the fact they both have “E-” somewhere near the middle. Want […]


Using the HTML5 required Attribute for Multiple Elements

While developing an eCommerce site I was asked by the client if it was possible to add the HTML5 required attribute to the telephone number and mobile number fields. Only one field would actually be required so if a customer entered a telephone number the browser wouldn’t throw an error about the mobile number field […]


Post Lockdown v2.0 Released

Today I released v2.0 of the Post Lockdown WordPress plugin. It can be downloaded via the WordPress plugin repository or directly onto your WordPress powered site by going to Plugins > Add New in WordPress admin and searching for Post Lockdown. This major release is pretty much a rewrite of the old version whilst retaining […]