From 9568ca34f3f416420dc92350ae73d015ea06b267 Mon Sep 17 00:00:00 2001 From: blesh Date: Thu, 29 Nov 2012 17:21:38 -0500 Subject: [PATCH] Added data-localid="#idhere" functionality to support tabs for pages using the tag --- ui/jquery.ui.tabs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index dcb0c27689f..99790f90071 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -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", { @@ -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 {