Hey guys. This week the jQuery project released jQuery 1.5 which came with a number of interesting new features – one of the most significant ones was the concept of deferreds (or dfds for short) and the other was jQuery.sub(). Eric Hynds wrote a great article that explains deferreds in detail and today I’d like to explain .sub() in a short 10 minute screencast.
The basic idea behind jQuery.sub() is that it provides a relatively easy way to modify or override jQuery methods without affecting the original methods for others wishing to use them on the same page. It’s got a number of useful applications and in the screencast I’ll take you through some live examples that will (hopefully) explain them well, regardless of what level you’re at.
Watch the tutorial on how to use jQuery.sub() below (10 mins)
I recommend switching to HD mode and going fullscreen for the best viewing experience.
– The code used on jsFiddle.net: http://jsfiddle.net/g2txR/
– jQuery .sub() on the API site: http://api.jquery.com/jQuery.sub/
– YouTube 720p Mirror: http://www.youtube.com/watch?v=5RhZeMYssLc
– Vid.ly SD Mirror: http://vid.ly/2q3x9o/
– Blip.tv SD Mirror: http://blip.tv/file/4707329
Thanks to vladikoff and coldhead for reviewing the screencast before it went live.