Index: tabs_ui.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/tabs/tabs_ui.js,v retrieving revision 1.1 diff -u -p -r1.1 tabs_ui.js --- tabs_ui.js 25 May 2010 04:56:40 -0000 1.1 +++ tabs_ui.js 11 Nov 2010 06:13:07 -0000 @@ -10,6 +10,27 @@ Drupal.behaviors.tabs = function (contex } }); + // if we have an anchor, check to see if its inside our tabs + if (window.location.hash) { + var panelID = false; + $('.drupal-tabs:not(tabs-processed)', context).children('div').addClass('tabs-processed').each(function() { + // if we found it, activate the tab + var found = $(this).find(window.location.hash); + if (found.length != 0) { + panelID = this.id; + return false; + } + }); + + if (panelID != false) { + $('.drupal-tabs ul', context).children('li').each(function() { + if ($(this).find('a').attr('href') == '#' + panelID) { + $(this).addClass('ui-tabs-selected'); + } + }); + } + } + var fx = {duration: Drupal.settings.tabs.speed}; if (Drupal.settings.tabs.fade) { fx.opacity = 'toggle';