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.
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);
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.
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.
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.
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.
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.
An overview of Microformats, the benefits they bring to the web, and how Mozilla intends to expose them in future browsers.
Where CSS is now, what we can expect from it in the future, and which CSS 3 declarations you could be using now.
A hands-on primer in grid-based design, with plenty of examples to follow.
Why typography on the web is so poor compared to print, and what you can do to make your text look nicer.