From cf85f6726bf41dc292b75b126e72889b01e3f706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 11 Feb 2014 11:54:34 -0800 Subject: [PATCH] Tests: Use .bind() instead of .on() --- tests/unit/autocomplete/autocomplete_core.js | 2 +- tests/visual/position/position_feedback.html | 2 +- tests/visual/selectmenu/selectmenu.html | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js index 81d534cb8..2a901006b 100644 --- a/tests/unit/autocomplete/autocomplete_core.js +++ b/tests/unit/autocomplete/autocomplete_core.js @@ -154,7 +154,7 @@ test( "allow form submit on enter when menu is not active", function() { delay: 0, minLength: 0 }); - element.on( "keypress", function( e ) { + element.bind( "keypress", function( e ) { didMove = !e.isDefaultPrevented(); }); element.simulate( "keydown", { keyCode: ( isKeyUp ? $.ui.keyCode.UP : $.ui.keyCode.DOWN ) } ); diff --git a/tests/visual/position/position_feedback.html b/tests/visual/position/position_feedback.html index 847bbf2ef..00b1f65ee 100644 --- a/tests/visual/position/position_feedback.html +++ b/tests/visual/position/position_feedback.html @@ -64,7 +64,7 @@ using: using }; }; - $( document ).on( "mousemove", function( event ) { + $( document ).bind( "mousemove", function( event ) { element.position( positionWithOffset( event.pageX - targetOffset.left, event.pageY - targetOffset.top ) ); oppositeElement.position( positionWithOffset( diff --git a/tests/visual/selectmenu/selectmenu.html b/tests/visual/selectmenu/selectmenu.html index b492ccd8f..e6041ea67 100644 --- a/tests/visual/selectmenu/selectmenu.html +++ b/tests/visual/selectmenu/selectmenu.html @@ -70,7 +70,7 @@ $('#disabled1, #disabled2, #disabled3').selectmenu(); var disabled4 = $('#disabled4').selectmenu(); - $("#disable_select").on("click", function() { + $("#disable_select").bind("click", function() { if (disable_select) { disable_select = false; disabled4.selectmenu("disable"); @@ -82,7 +82,7 @@ return false; }); - $("#disable_option").on("click", function() { + $("#disable_option").bind("click", function() { if (disable_option) { disable_option = false; disabled4.find("option:eq(0)").attr("disabled", "disabled"); @@ -94,7 +94,7 @@ return false; }); - $("#disable_optgroup").on("click", function() { + $("#disable_optgroup").bind("click", function() { if (disable_optgroup) { disable_optgroup = false; disabled4.find("optgroup:eq(0)").attr("disabled", "disabled");