ded / bonzo

library agnostic, extensible DOM utility
Other
1.32k stars 137 forks source link

Fix .after() and .before() to accept sets/arrays of nodes (like other methods) #66

Closed benvinegar closed 12 years ago

benvinegar commented 12 years ago

Enables the following:

var created = $.create('<span>some <em>shiza</em></span>')
$('.after-created-examples').after(created);

This works using a number of other Bonzo methods, so it seemed natural to extend it here. For example, one could do the following just fine:

var created = $.create('<span>some <em>shiza</em></span>')
created.appendTo('.after-created-examples');
benvinegar commented 12 years ago

Bah, fucked up this pull request, brb.