diff --git a/tabs.js b/tabs.js index 6f29004..584ea17 100644 --- a/tabs.js +++ b/tabs.js @@ -22,8 +22,14 @@ Drupal.behaviors.tabs = function (context) { .find('> ul') .tabs({ spinner: Drupal.t('Loading...'), + select: function(event, ui) { + $(this).css('height', jQuery(this).height()); + $(this).css('overflow', 'hidden'); + }, // Add the 'active' class when showing tabs and remove it from siblings. show: function(event, ui) { + $(this).css('height', 'auto'); + $(this).css('overflow', 'visible'); $(ui.tab).parent('li').addClass('active').siblings('li').removeClass('active'); }, fx: fx diff --git a/tabs_ui.js b/tabs_ui.js index 9f61839..ae6b100 100644 --- a/tabs_ui.js +++ b/tabs_ui.js @@ -21,8 +21,14 @@ Drupal.behaviors.tabs = function (context) { $('.drupal-tabs:not(.tabs-processed)', context) .tabs({ spinner: Drupal.t('Loading...'), + select: function(event, ui) { + $(this).css('height', jQuery(this).height()); + $(this).css('overflow', 'hidden'); + }, // Add the 'active' class when showing tabs and remove it from siblings. show: function(event, ui) { + $(this).css('height', 'auto'); + $(this).css('overflow', 'visible'); $(ui.tab).parent('li').addClass('active').siblings('li').removeClass('active'); }, fx: fx