jQuery on vs Click

Benchmark created on


Preparation HTML

<a href="#" id="clicker">ClickMe</a>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
$.on
$('#clicker').on('click', function(){
console.log('click');
return false;
});
ready
$.click
$('#clicker').click(function(){
console.log('click');
return false;
});
ready

Revisions

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