An Elegant Way to Load Javascript Conditionally
The Fade-In on the new Google homepage is elegant visually, but also in implementation. It seems to make the home page load much more quickly, and leverages the mouse movement javascript hook to only waste resources / time loading additional page elements on mouse enabled browsers. Quite a clever way of disabling the effect on mobile devices.
The html element has the following for attribute:
onmousemove=“google&&google.fade&&google.fade()”