From: Scott González Date: Sun, 29 May 2011 13:13:35 +0000 (-0400) Subject: Tooltip video player demo: Close tooltip on click of popup button. X-Git-Tag: 1.9m6~111^2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a1f9ca724834c7d1e66401f8cea8063346392770;p=jquery-ui.git Tooltip video player demo: Close tooltip on click of popup button. --- diff --git a/demos/tooltip/video-player.html b/demos/tooltip/video-player.html index e0db0575d..1d8458abb 100644 --- a/demos/tooltip/video-player.html +++ b/demos/tooltip/video-player.html @@ -85,9 +85,12 @@ }, text: !!$( this ).attr( "title" ) }); - if ( !button.next().is( ":ui-popup" ) ) { + if ( button.next().is( ":ui-popup" ) ) { + button.click(function( event ) { + $( ".demo" ).tooltip( "close", event ); + }); + } else { button.click(function() { - console.log( "click" ); notify( button ); }); }