The jQuery Cycle Plugin from Malsup is a plugin that I use on a regular basis. It’s easy to add to a site, customisable, and the documentation and examples on the website are excellent. One thing that’s always gnarked me a little about the plugin however is how the slides alway...
Sometimes we might not know the full title of a HTML page when the page first loads, meaning that we will need to set it dynamically. I found myself in this scenario recently and needed to set the title using JavaScript. I couldn’t believe how easy it was to do and wanted to share th...
And for my next trick… I will make labels appear above overlays produced using the Google Maps API. Ok, I’m far from a magician (some might say I’m good at making money, beer and food disappear) but when coding I sometimes wish that certain things could just be made to wo...
In JavaScript it’s possible to set a cookie in order to remember a users preference, or to track information about a user’s visit. If, like me, you looked on the W3Schools website to find out how to set cookies you’ll see that they recommend the following JavaScript code:...
When I first saw the ‘Draw-a-search’ feature on the Rightmove website a few years ago I was impressed. It was a method of searching that I hadn’t seen before and provided the user with a visual concept of filtering results. Three years on from it’s original creation...
When a large Google Map is shown on a page, I sometimes find it frustrating that when I scroll my mousewheel to navigate down the page, that the map zooms in or out intead. As a result, I wanted to demonstrate how this functionality can be disabled when using the Google Maps V3 API. To [.....
I explain through code samples how to correctly empty a form and reset it back to it's original values using jQuery. This is a particular scenario where the reset is done via an external trigger....
Flot is one of my favourite plotting libraries out there on the web at the moment. I’ve had a few encounters with it over the years, however earlier today I came across a rather unusual requirement; to display the Y-axis in the reverse order. The graph in question was being used to d...
Whilst working with a JavaScript object earlier today I found myself coming up against an error in the JavaScript console that read as follows: SCRIPT1010: Expected identifier The error was only present in Internet Explorer 7 and 8, was a little unhelpful to say the least, and was showing ...
I’ll dive straight into this one by explaining the problem I came up against earlier this week whilst cross browser testing a feature in Internet Explorer 7 and 8. Let’s look at the following element: What we’ve got here is a black div with 50% opactiy, hovered over the t...