]> source.dussan.org Git - jquery-ui.git/commitdiff
Update data naming for Tooltip. Partial fix for #7810
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 1 Mar 2012 12:32:47 +0000 (13:32 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 1 Mar 2012 12:32:47 +0000 (13:32 +0100)
ui/jquery.ui.tooltip.js

index 6a41f8c4a778a593351d28c25775effbab5cbc2f..08ad19636e4947d9902cc5fcae7f9570e3c363e5 100644 (file)
@@ -72,7 +72,7 @@ $.widget( "ui.tooltip", {
                        var element = $( this );
                        if ( element.is( "[title]" ) ) {
                                element
-                                       .data( "tooltip-title", element.attr( "title" ) )
+                                       .data( "ui-tooltip-title", element.attr( "title" ) )
                                        .attr( "title", "" );
                        }
                });
@@ -82,8 +82,8 @@ $.widget( "ui.tooltip", {
                // restore title attributes
                this.element.find( this.options.items ).andSelf().each(function() {
                        var element = $( this );
-                       if ( element.data( "tooltip-title" ) ) {
-                               element.attr( "title", element.data( "tooltip-title" ) );
+                       if ( element.data( "ui-tooltip-title" ) ) {
+                               element.attr( "title", element.data( "ui-tooltip-title" ) );
                        }
                });
        },
@@ -99,8 +99,8 @@ $.widget( "ui.tooltip", {
                        return;
                }
 
-               if ( !target.data( "tooltip-title" ) ) {
-                       target.data( "tooltip-title", target.attr( "title" ) );
+               if ( !target.data( "ui-tooltip-title" ) ) {
+                       target.data( "ui-tooltip-title", target.attr( "title" ) );
                }
 
                target.data( "tooltip-open", true );
@@ -180,8 +180,8 @@ $.widget( "ui.tooltip", {
                }
 
                // only set title if we had one before (see comment in _open())
-               if ( target.data( "tooltip-title" ) ) {
-                       target.attr( "title", target.data( "tooltip-title" ) );
+               if ( target.data( "ui-tooltip-title" ) ) {
+                       target.attr( "title", target.data( "ui-tooltip-title" ) );
                }
 
                target.removeAttr( "aria-describedby" );