nathansobo/space-pen — pull request #7 by metaskills (2012-02-25 23:37:06+00:00)
Title: Fix DOM manipulation bugs for append, prepend, after and before.

These jQuery functions take multiple arguments and some arguments can even be arrays too. Below is the API links. Note the section in each called "Additional Arguments"

http://api.jquery.com/append/
http://api.jquery.com/prepend/
http://api.jquery.com/after/
http://api.jquery.com/before/

The patch solve quite a few issues. First it allows undefined to be passed to these functions without bombing. The existential operator for element? is the simple fix for that. Second, it makes the function overrides for these methods compatible with multiple arguments. The test is the most complex case where the second argument is an array of elements. Tests included.