jQuery document.createElement equivalent?

Here’s your example in the “one” line. Update: I thought I’d update this post since it still gets quite a bit of traffic. In the comments below there’s some discussion about $(“<div>”) vs $(“<div></div>”) vs $(document.createElement(‘div’)) as a way of creating new elements, and which is “best”. I put together a small benchmark, and here … Read more