In the jQuery add
documentation, it lists an add(html)
overload which describes the html
argument as:
An HTML fragment to add to the set of matched elements.
Since there is already an add(element)
overload, I assume this means that you pass it an HTML string, as in:
var set = $();
set.add("<div></div>");
document.write(set.length); // prints 0
However, when this code is run, it has no effect on the jQuery wrapped set. What am I missing?