jquery vanilla val (v15)

Revision 15 of this benchmark created by selman on


Preparation HTML

<input id='jq'>
<input id='nojq'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Setup

$('#jq').click(function() {
      var val = $(this).val();
    });
    
    document.getElementById('nojq').onclick = function(){
      var val = this.value;
    };

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery
$('#jq').click();
ready
No jQuery
$('#no-jq').click();
 
ready
javascript only
document.getElementById('nojq').onclick();
ready

Revisions

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