Treehouse

jQuery Tutorials

  • CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native...

  • jQuery: Multiple AJAX and JSON Requests, One Callback

    I've been working on a new feature for the Mozilla Developer Network which requires loading of a basic script file as well as a JSON stream.  Since we use jQuery, that means a jQuery.getScript and a jQuery.getJSON.  I...

  • DO NOT TRIGGER REAL EVENT NAMES WITH JQUERY!

    Sometimes JavaScript toolkits give us so much functionality that we can get hung by it if we're not careful.  The more functionality that we use within a toolkit, the more opportunity there is to have one set of changes or...

  • Loading Scripts with jQuery

    JavaScript loaders are incredibly powerful and useful utilities.  I've even covered a few of them on this blog, like curljs and LABjs, and have used RequireJS and the Dojo loader on personal projects.  They're super powerful but can...

  • 5 Best Practice Mentalities to Get Over

    Every developers strives to write clean, maintainable, and functional code, whether they hack on the server side or dabble on the client side. Over the last few decades of the web, we've learned from some of our early mistakes...

  • jQuery Wookmark

    The first thing that hits you when you visit Pinterest is "Whoa, the columns are the same width and the photos are cut to fit just the way they should."  Basic web users probably think nothing of it but as...

  • Create a Brilliant Sprited, CSS-Powered Firefox Animation

    Mozilla recently formally announced Firefox OS and its partners at Mobile World Congress and I couldn't be more excited.  Firefox OS is going to change the lives of people in developing countries, hopefully making a name for itself...

  • Build a Street Fighter Demo with CSS Animations and JavaScript

    I recently learned a cool technique from Simurai about how to animate PNG sprites with the CSS3 animations' steps() property. The main idea in this technique is to "recreate" some kind of animated GIF but with the...

  • Get the jQuery Version

    Many JavaScript frameworks provide a version property on their main object, providing a quick bit of important information about the framework.  The main jQuery object doesn't provide this property, however, so developers need to do a bit more work to...

  • Create and Retrieve Nested Objects with jQuery

    The ability to create and retrieve nested objects by objectified string path is incredibly useful.  Not only do you not need to do the manual string of object/property checks to avoid "{x} is not defined" errors, but if you create...