Skip to content

Commit

Permalink
Update data naming for Tooltip. Partial fix for #7810
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Mar 1, 2012
1 parent e93993c commit 59f2e88
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ui/jquery.ui.tooltip.js
Expand Up @@ -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", "" );
}
});
Expand All @@ -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" ) );
}
});
},
Expand All @@ -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 );
Expand Down Expand Up @@ -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" );
Expand Down

0 comments on commit 59f2e88

Please sign in to comment.