]> source.dussan.org Git - jquery-ui.git/commitdiff
Tooltip video player demo: Close tooltip on click of popup button.
authorScott González <scott.gonzalez@gmail.com>
Sun, 29 May 2011 13:13:35 +0000 (09:13 -0400)
committerScott González <scott.gonzalez@gmail.com>
Sun, 29 May 2011 13:13:35 +0000 (09:13 -0400)
demos/tooltip/video-player.html

index e0db0575da9b114083240c06876bb4185aa698bc..1d8458abb944591b8c3218684d4e47d120e3773b 100644 (file)
                                },
                                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 );
                                });
                        }