FitVids.js is a jQuery plugin used to create fluid videos. It helps makes video embeds from YouTube, Vimeo and a number of other sources display nicely on responsive sites. FitVids calculates the ratio of a video, wraps it in a div and sets the padding to enforce a ratio. A typical 4:3 YouTube embed starts as: <iframe width=”420″ […]
Internet Explorer makes me sad every time I open it to cross-browser test during development and it crashes on console.log. A simple check OR define option can kill console in the IE developer toolbar, so I decided to write a more robust cross-browser compatible console.log.
Jeremy Keith’s recent post Polyfills and products asked an interesting question about handing polyfilled code to clients: [Short term client projects] makes it very tricky to include a polyfill in our deliverables. We’d need to figure out a way of also including a timeline for revisiting that polyfill and evaluating when it’s time to drop […]
As I’ve mentioned previously, I’m in the process of redesigning this web site. It’s very much a work in progress. Pattern Library As a first step I’m building a pattern library and I’ve decided to open source the repo during the build process. I’m using Pattern Lab for the purpose.
The Typekit kit editor provides two versions of the embed code, the default version blocks rendering and the asynchronous version which can produce a flash of unstyled content (FOUC). In the case of Typekit, I prefer the FOUC over slowing down rendering. The asynchronous code also offers the advantage of your site staying online should […]
Imagine you’re playing the latest hash-tag game on Twitter when you see this friendly tweet: You might want to check your #WP site. It includes two copies of jQuery. Nothing’s broken, but loading time will be slower. Continue reading at Smashing Magazine.
wp_localize_script() is the tool to do it with.
In Part 1 we introduced the