Fork me on GitHub

James Allardice

Assorted thoughts of a web developer

Welcome!

James Allardice

I'm a young, enthusiastic web developer with a passion for front-end development with HTML5, JavaScript and jQuery. I spend a lot of my free time over at Stack Overflow where I enjoy helping out others with problems relating to the above technologies. I doubt I'll post here all the time, but I will try my best to ensure the things I do post are useful and interesting to anyone who may stumble across them!

I'm always on the lookout for exciting opportunities so if you have something that you think qualifies as such don't hesitate to get in touch.


Recent posts

  • Chrome on iOS might eat your global variable!

    TL;DRThe current version of Google Chrome on iOS (23) will overwrite anything you may have assigned to a global variable with the identifier a. There does not appear to be any workaround, short of changing your identifier. I’ve raised a bug report which I recommend you follow for updates from...

  • Maintaining consistent JavaScript with JSLint

    This article was posted to globaldev. Read the full post. What follows is a short excerpt from the full post. In an attempt to make our JavaScript easier on the eye, we have started using Douglas Crockford’s JSLint tool to enforce a consistent style throughout. I’m sure you have your...

  • Placeholders.js - new version released!

    A new and improved version of my HTML5 placeholder attribute polyfill is now available. You can find the code on GitHub. The new version features support for the new Chrome/Safari style placeholders, which do not vanish when the element receives focus, instead hiding when some input is made. Significant parts...

  • Introducing JSLintErrors.com - Understanding JSLint's error messages

    http://jslinterrors.com is a new resource that aims to help you improve your JavaScript by helping you understand the sometimes cryptic error messages produced by JSlint. The whole site is open source and available on GitHub, so you can help out by writing explanations for JSLint error messages that are not...

  • Who will guard the guards? Safeguarding the JavaScript hasOwnProperty method

    I’m sure (well, I hope) that you always guard your for...in loops in JavaScript. By "guard" I mean use the hasOwnProperty method to ensure the property referred to by the current iteration of the loop actually belongs to the object you are looping through, and not to one of the...

  • Passing an element or object to the jQuery .html() method

    Earlier today I answered a question on Stack Overflow. The question asked if there was a way to keep the original DOM element when inserting an existing element into another with the jQuery .html() method. I answered, pointing out that by inserting an existing element into another, the element was...

  • Lenovo's lesson in why it pays to be careful when pushing code live

    Someone at work today noticed an interesting "feature" on the Lenovo website. The feature was a simple "compare" check box and link (select a couple of check boxes and click “compare” to see the differences between a the selected laptops). Well unfortunately for some web developer at Lenovo, an unfortunate...

  • How do you conditionally declare a function in JavaScript?

    As is so often the case, this article has been inspired by a question I answered earlier today on Stack Overflow. The question asked how to declare a function if some condition was true. There were good reasons for this, as you can read in the question itself. First off,...

  • Introducing Front End Build, a full front-end build suite

    Download Front End Build here and speed up your website today! I’ve been very busy over the past few days producing a simple build tool that’s designed to speed up your web pages by reducing file sizes, and increase confidence in your code through validation. Every web developer, whether working...

  • Explaining some odd behaviour of the Google Closure Compiler

    Firstly, I would like to apologise for my lack of recent posts. I’ve been incredibly busy over the last month, starting a new job and moving house, so I’ve had little spare time to get my thoughts down on paper. Now I’m all settled in, I hope to get back...

Want to read more? Choose a page to find more articles.

1 · 2 · 3 · 4

Tags

Latest Tweets


Copyright © 2012 James Allardice