jQuery .live() vs .delegate() vs .on() (v7)

Revision 7 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<div id="context">
<p id="content">Some paragraph</p>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
.live()
$('#content').live('click', $.noop);
ready
.delegate()
$('#content').delegate('click', $.noop);
ready
.delegate() on document
$(document).delegate('#content','click', $.noop);
ready
.on()
$('#content').on('click', $.noop);
ready
.on() on document
$(document).on('click', '#content', $.noop);
ready

Revisions

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