jQuery unshift is not a function – Solution!

At times, jQuery can induce some scope issues when it comes to using the JavaScript array prototypes. One example in particular is the unshift() array prototype. In the same context as array.push(), Firebug may throw the error that unshift is not a function. Honestly, I can’t account for why this happens, but in the event you need to use unshift for a jQuery object, I have created a jQuery plugin called .frontpush() that works around the issue.

Bugs? Comments? Leave your feedback in the comments section below

Related Posts:

About the Author:

Joseph is the lead developer of Vert Studios, a web design company located in Tyler, Tx. Follow him on Twitter! @Joe_Query.

Add to the conversation: