jQuery Create Element (v14)

Revision 14 of this benchmark created by Javier on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<div id="target" />

Teardown



            $('#target').html('');
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
document.createElement
var e = $(document.createElement('div')).appendTo('#target');
ready
div
var e = $('<div>').appendTo('#target');
ready
div with a closing tag
var e = $('<div></div>').appendTo('#target');
ready
self closing div
var e = $('<div/>').appendTo('#target');
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.