$().click vs addEventListener (v16)

Revision 16 of this benchmark created on


Preparation HTML

<div id="test"></div><script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<script>
  var func = function() {};

</script>

Setup

var elm = document.getElementById("test");
    var $elm = $(elm);

Test runner

Ready to run.

Testing in
TestOps/sec
$().click
$elm.on("click", func);
$elm.off("click", func);
 
ready
addEventListener
elm.addEventListener("click", func, false);
elm.removeEventListener("click", func, false);
 
ready

Revisions

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