Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ui/jquery.ui.tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ function getNextTabId() {
}

function isLocal( anchor ) {
return anchor.hash.length > 1 &&
return $(anchor).data('localid') || (anchor.hash.length > 1 &&
anchor.href.replace( rhash, "" ) ===
location.href.replace( rhash, "" )
// support: Safari 5.1
// Safari 5.1 doesn't encode spaces in window.location
// but it does encode spaces from anchors (#8777)
.replace( /\s/g, "%20" );
.replace( /\s/g, "%20" ));
}

$.widget( "ui.tabs", {
Expand Down Expand Up @@ -400,8 +400,8 @@ $.widget( "ui.tabs", {
originalAriaControls = tab.attr( "aria-controls" );

// inline tab
if ( isLocal( anchor ) ) {
selector = anchor.hash;
if (isLocal(anchor)) {
selector = $(anchor).data('localid') || anchor.hash;
panel = that.element.find( that._sanitizeSelector( selector ) );
// remote tab
} else {
Expand Down