jQuery 1.6.2 vs 1.7 event

Benchmark created on


Preparation HTML

<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js"></script>
<script type="text/javascript">
var $170 = jQuery.noConflict();
</script>


<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
var $162 = jQuery.noConflict();
</script>

<div class="wrapper">
     <div class="innerWrapper">
          <div class="button">
               <a href="">
                    <span class="buttonText">Text</span>
               </a>
          </div>
     </div>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
jq1.7 on
$170("a").on("touchstart", function() {
//test
});
$170("a").on("touchend", function() {
//test
});
ready
jq1.7 on with document
$170("body").on("touchstart", "a", function() {
//test
});
$170("body").on("touchend", "a", function() {
//test
});
ready
jq1.6.2 bind
$162("a").bind("touchstart", function() {
//test
});
$162("a").bind("touchend", function() {
//test
})
ready
jq1.6.2 delegate
$162("body").delegate("a", "touchstart", function() {
//test
});
$162("body").delegate("a", "touchend", function() {
//test
});
ready
jq1.6.2 live
$162("a").live("touchstart", function() {
//test
});
$162("a").live("touchend", function() {
//test
});
ready

Revisions

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