Closed benvinegar closed 12 years ago
thanks for the request. i'm confused how the example is an array of nodes. is it not just one node? <span> some <em>shiza</em></span>
— tis still just one node to append (despite it having children).
i'll have a look at the tests and see what's going on.
In this case, it's just a Bonzo object. By "set", I meant Bonzo object. I should have included a test for arrays too.
Okay, I've seriously beefed up the test suite to test a range of inputs for each of after, before, append, prepend.
Also, I changed append and prepend to use Bonzo.create instead of normalize. This is to match jQuery's append and prepend behaviour, where if you pass append and prepend a DOM element (or jQuery) object, that object is cloned for each append target.
oy. right on. will have a look
I also ran into a problem with after()
. I replaced it in my code with parent().append()
and it works fine. Maybe the after()
method should be replaced with something like that?
D'oh! Nvm, only works for last element in its parent, which happens to be what I'm doing.
Getting constantly burned by this diff.
Another (related) issue is that one can't do this $('#foo').html($('
looks like @rvagg is starting to jump on these
Enables the following:
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: