jQuery Live VS On

Benchmark created by Jasper on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Live
$('#a_div').live('click', function () {});
ready
On (similar to delegate)
$(document).on('click', '#a_div', function () {});
ready
On (similar to bind)
$('#a_div').on('click', function () {});
ready

Revisions

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