Advanced

Using jQuery’s .pushStack() for reusable DOM traversing methods

The .pushStack() method has been in jQuery since before version 1.0, but it hasn't received a whole lot of attention outside of core developers and plugin authors. While its usefulness may not be immediately apparent, it can come in really handy in some situations, so I'd like to take a quick look at what it […]
Read the rest of this entry »

Merging jQuery Deferreds and .animate()

Editor's Note: This article originally appeared on danheberden.com. jQuery’s .animate() method, and the shorthand methods that use it, are fantastic tools to create animations. Creating animations that link together to achieve a particular effect, and do something specific at the end of the animation, can be a painful, messy task. Luckily, we have .queue() for […]
Read the rest of this entry »

Making a jQuery Plugin Truly Customizable

Most if not all of the jQuery plugins out there have some level of customization. But very few of the plugin authors have mastered the very particular art involved. Achieving the "optimum level" of customization is a bit of a balancing act… go too far either way and you've got an unusable plugin!
Read the rest of this entry »

Implementing Prototype’s Array Methods in jQuery

One of the biggest concerns I've heard mentioned from users of the Prototype library about jQuery is the lack of support for various array methods. The robust features Prototype provides for arrays is of great benefit to developers that do a lot of array manipulation in their JavaScript. However, I find that after moving to […]
Read the rest of this entry »

Peeling Away the jQuery Wrapper and Finding an Array

If you haven't poked around under the hood of jQuery, you might not be aware that when you pass the jQuery function an expression or DOM element it places these elements (or, possibly a single element) into an object, and then this object is returned so that it can be chained. Without getting into the […]
Read the rest of this entry »

Working with Events, part 2

In my last article, I described the common problem of events seemingly ceasing to work for new elements added to a document, whether by some form of ajax or by DOM modification. We examined one way to overcome the problem: Event Delegation. With event delegation, we bind the event handler to a containing element that […]
Read the rest of this entry »

Responsive Menu
Add more content here...