jQuery .live() vs .click() (v43)

Revision 43 of this benchmark created by Yogendra Gautam on


Description

test jquery

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>
<div id="context">
  <p>
    <a id="#test"> click me</a>
  </p>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
.live()
$('#test').live('click', function() {
  alert('me aahe')
});
ready
.click
$('#test').click(function() {
  alert('me aahe');
});
ready
.delegate()
$('#test').delegate('click', function() {
  alert('me aahe')
})
ready

Revisions

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