Category: Scripting

Building HTML5 video controls with JavaScript

The HTML5 video element is now included in Firefox, Safari & Chrome, and on its way in Opera. By using JavaScript to access the media elements API it’s easy to build your own custom controls for it; in this article I’m going to show how I built a (very) basic control interface.

Read the full article


Quick testing for console.log

I’m happy to see that IE8 includes native support for console.log, the JavaScript command which writes information to your preferred debugging tool (mine is Firebug). If you leave it in your code – as I did on my latest project – it throws an error in IE7 & below.

The way around it is to quickly check that the command is supported by your browser, and to provide an alternative (I use that old standby, alert) if not; and the quickest way to do that is with the if...else shorthand:

window.console ? console.log(foo) : alert(foo);

Very quick equal-height columns in jQuery

I’m having a bit of a love affair with jQuery, the Javascript library, at the moment. I know my way around JS but am far from an expert, so jQuery’s simple syntax is a godsend for me, and provides huge savings in my development time.

One quick technique I used yesterday was to make three elements of equal height; it’s very simple and won’t cope with dynamic content, but is perfectly suitable for simple page layouts.

Read the full article


What I saw at @media 2008

As is customary (or as customary as ‘twice’ can be), here is a quick round-up of the sessions I attended at @media this year, with links to slides where available (which, as I type this, is pretty much unavailable).

Sessions which I found particularly interesting should be covered in more detail later, and I’ll update here as I find more presentations.

Read the full article


Bloglines moves backwards with Ajax

I’ve used Bloglines for a long time to organise the many (too many?) feeds I read daily. I’ve always been happy with it, resisting the charms of new kids on the block such as Google Reader, but recently there’ve been some changes I find have taken the service a few steps backwards.

Read the full article


Five slideshow presentations I wish I’d seen

I’m off to @media Europe this week, and looking forward to hearing presentations from some of the best in the business.

Of course there are many excellent events that take place worldwide that I can’t attend, and many presentations I’d love to see. Below are five links to slideshows from events that have taken place this year, which I’ve found interesting even without being able to see them presented.

Christian Heilemann: Seven Reasons for Code Bloat

Ostensibly about JavaScript, but also of great value to anyone who writes code. How to plan well to avoid bloated code, and how to pass that on to anyone who follows you.

Alex Faaborg: Placelessness and the Advance of Micropublishing

An overview of Microformats, the benefits they bring to the web, and how Mozilla intends to expose them in future browsers.

Andy Budd: The Future of CSS

Where CSS is now, what we can expect from it in the future, and which CSS 3 declarations you could be using now.

Khoi Vinh & Mark Boulton: Grids are Good

A hands-on primer in grid-based design, with plenty of examples to follow.

Richard Rutter & Mark Boulton: Web Typography Sucks

Why typography on the web is so poor compared to print, and what you can do to make your text look nicer.


Newer | Older

Aside

I’ve updated my Speaking page to include more conferences, more videos, and a little on my speaking requirements and preferences. I’m planning to cut down on the number of talks I give in 2014 (twelve is too many), but am always open to interesting offers and opportunities, so please get in touch if you’re organising an event.

[#] 1 Comment