jQueryLiveVsOn

JavaScript performance comparison

Test case created

Info

Este teste tem a finalidade de testar a diferença das funções live e on, sendo que a função live do jQuery foi depreciada.

Preparation code

<input type="button" id="btn_test" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Using live
$('#btn_test').live('mouseup', function() {
  alert('Using Live.');
});
pending…
Using On
$('#btn_test').on('click', function() {
  alert('Using On.');
});
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment