One of the most useful tutorial videos for more advanced JavaScript

I can’t stop telling people about this video 10 Things I Learned from the jQuery Source by Paul Irish at This is a great video which delves into how jQuery works, and how you could use the cleverness outside of a jquery application. One example, and only one because you should watch the video if you are interested in learning more, which opened my eyes was the most basic starting feature of jQuery the Self-Executing Anonymous function and using it with setTimeout() to replace the use of setInterval().

// come code here

This function will call itself and if you put a setTimeout() inside it to call itself again you can get a very similar effect to setInterval() with the key exception that if you were to setInterval(methodname,10) and it takes longer than 10ms to run the method this will keep calling it even though the last query had not finished yet, whereas by using setTimeout(self,10) you will still get the 10ms break between calls but it will only start counting when the previous call finishes.