aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-05-13 22:02:14 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-05-20 14:27:57 -0400
commit24f1ce9ea046607ae9d0611aefbe5bbd636f8d32 (patch)
tree3cb4d72e90061a7c88c614e2ff80244bc7c48e4e
parentc25a541fc414bc46a2ab6911ca2a09a1c772c999 (diff)
downloadjquery-ui-24f1ce9ea046607ae9d0611aefbe5bbd636f8d32.tar.gz
jquery-ui-24f1ce9ea046607ae9d0611aefbe5bbd636f8d32.zip
Tooltip: Remove core event/alias and deprecated module dependencies
-rw-r--r--demos/tooltip/forms.html2
-rw-r--r--demos/tooltip/video-player.html4
-rw-r--r--tests/unit/tooltip/core.js10
-rw-r--r--tests/unit/tooltip/events.js8
-rw-r--r--tests/unit/tooltip/options.js2
-rw-r--r--tests/visual/tooltip/tooltip.html4
6 files changed, 15 insertions, 15 deletions
diff --git a/demos/tooltip/forms.html b/demos/tooltip/forms.html
index d93c004ba..4a593ef51 100644
--- a/demos/tooltip/forms.html
+++ b/demos/tooltip/forms.html
@@ -36,7 +36,7 @@
$( "<button>" )
.text( "Show help" )
.button()
- .click(function() {
+ .on( "click", function() {
tooltips.tooltip( "open" );
})
.insertAfter( "form" );
diff --git a/demos/tooltip/video-player.html b/demos/tooltip/video-player.html
index 23747bb20..3d4e467be 100644
--- a/demos/tooltip/video-player.html
+++ b/demos/tooltip/video-player.html
@@ -74,7 +74,7 @@
},
text: !!$( this ).attr( "title" )
});
- button.not( ".menu" ).click(function() {
+ button.not( ".menu" ).on( "click", function() {
notify( button );
});
});
@@ -83,7 +83,7 @@
});
$( "button.menu" )
- .click(function() {
+ .on( "click", function() {
$( document ).tooltip( "close", { currentTarget: this });
var menu = $( this ).next().show().position({
my: "left top",
diff --git a/tests/unit/tooltip/core.js b/tests/unit/tooltip/core.js
index 135fa480b..de0b90224 100644
--- a/tests/unit/tooltip/core.js
+++ b/tests/unit/tooltip/core.js
@@ -137,20 +137,20 @@ asyncTest( "programmatic focus with async content", function() {
}
});
- element.bind( "tooltipopen", function( event ) {
+ element.on( "tooltipopen", function( event ) {
deepEqual( event.originalEvent.type, "focusin" );
- element.bind( "tooltipclose", function( event ) {
+ element.on( "tooltipclose", function( event ) {
deepEqual( event.originalEvent.type, "focusout" );
start();
});
setTimeout(function() {
- element.blur();
+ element.trigger( "blur" );
});
});
- element.focus();
+ element.trigger( "focus" );
});
asyncTest( "destroy during hide animation; only one close event", function() {
@@ -161,7 +161,7 @@ asyncTest( "destroy during hide animation; only one close event", function() {
hide: true
});
- element.bind( "tooltipclose", function() {
+ element.on( "tooltipclose", function() {
ok( true, "tooltip closed" );
});
diff --git a/tests/unit/tooltip/events.js b/tests/unit/tooltip/events.js
index a953c6e91..d8e9fa2a9 100644
--- a/tests/unit/tooltip/events.js
+++ b/tests/unit/tooltip/events.js
@@ -29,12 +29,12 @@ test( "mouse events", function() {
expect( 2 );
var element = $( "#tooltipped1" ).tooltip();
- element.bind( "tooltipopen", function( event ) {
+ element.on( "tooltipopen", function( event ) {
deepEqual( event.originalEvent.type, "mouseover" );
});
element.trigger( "mouseover" );
- element.bind( "tooltipclose", function( event ) {
+ element.on( "tooltipclose", function( event ) {
deepEqual( event.originalEvent.type, "mouseleave" );
});
element.trigger( "focusout" );
@@ -45,12 +45,12 @@ test( "focus events", function() {
expect( 2 );
var element = $( "#tooltipped1" ).tooltip();
- element.bind( "tooltipopen", function( event ) {
+ element.on( "tooltipopen", function( event ) {
deepEqual( event.originalEvent.type, "focusin" );
});
element.trigger( "focusin" );
- element.bind( "tooltipclose", function( event ) {
+ element.on( "tooltipclose", function( event ) {
deepEqual( event.originalEvent.type, "focusout" );
});
element.trigger( "mouseleave" );
diff --git a/tests/unit/tooltip/options.js b/tests/unit/tooltip/options.js
index d091e3bad..a0730414e 100644
--- a/tests/unit/tooltip/options.js
+++ b/tests/unit/tooltip/options.js
@@ -208,7 +208,7 @@ test( "track and programmatic focus", function() {
expect( 1 );
$( "#qunit-fixture div input" ).tooltip({
track: true
- }).focus();
+ }).trigger( "focus" );
equal( "inputtitle", $( ".ui-tooltip" ).text() );
});
diff --git a/tests/visual/tooltip/tooltip.html b/tests/visual/tooltip/tooltip.html
index 034021cd8..c0ba7a11c 100644
--- a/tests/visual/tooltip/tooltip.html
+++ b/tests/visual/tooltip/tooltip.html
@@ -100,8 +100,8 @@
show: {
delay: 500
}
- }).click(function() {
- $( "#focus-on-me" ).focus();
+ }).on( "click", function() {
+ $( "#focus-on-me" ).trigger( "focus" );
});
});
</script>