Prepend accepts set 🔨

Fix for #244
master
Dmitry Baranovskiy 2014-05-15 17:04:05 +10:00
parent 5296fa16a0
commit d7e1f819bb
1 changed files with 7 additions and 0 deletions

View File

@ -1448,6 +1448,13 @@ function arrayFirstValue(arr) {
\*/
elproto.prepend = function (el) {
if (el) {
if (el.type == "set") {
var it = this;
el.forEach(function (el) {
it.prepend(el);
});
return this;
}
el = wrap(el);
var parent = el.parent();
this.node.insertBefore(el.node, this.node.firstChild);