jquery vanilla val

Benchmark created by Mahdi 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();
  });
  
  $('#no-jq').click(function() {
    var val = this.value;
  });

Test runner

Ready to run.

Testing in
TestOps/sec
No jQuery
$('#no-jq').click();
ready
jQuery
$('#jq').click();
ready

Revisions

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