Opened 12 years ago
Closed 12 years ago
#9188 closed enhancement (wontfix)
Let .html() take multiple arguments like append()
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | unfiled | Version: | 1.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Let .html() take multiple arguments like append() does. Obviously I can use append() or prepend() after the html() call, but it's probably more efficient to do it in one function.
I can't simply string-append the html since it's jquery objects that I am inserting, not pure html.
Note: See
TracTickets for help on using
tickets.
Since
.html()
is intended for string html arguments it seems strange to use it this way. When the args are strings you can just append them together, so allowing multiple strings doesn't seem to offer anything. You can always just.append(jq1, jq2, jq3)
if you have multiple jQuery objects.Internally
.html()
often uses.empty().append()
so I doubt it is slower, but you could write some jsperf.com tests.