jQuery 1.6.2 vs 1.7 event (v2)

Revision 2 of this 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>

Setup

$162body = $162("body");
    $170body = $170("body");
    
    $162a = $162("a");
    $170a = $170("a");

Teardown


    $162("body").unbind();
    $170("body").off();
    
    $162("a").unbind();
    $170("a").off();
  

Test runner

Ready to run.

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

Revisions

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