? tabs_better_js.patch Index: tabs.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/tabs/tabs.js,v retrieving revision 1.14 diff -u -p -r1.14 tabs.js --- tabs.js 25 May 2010 04:56:40 -0000 1.14 +++ tabs.js 31 May 2010 09:48:40 -0000 @@ -19,37 +19,39 @@ Drupal.behaviors.tabs = function (contex } // Process custom tabs. var selected = null; - $('.drupal-tabs:not(.tabs-processed)', context) - .find('> ul') - .tabs({ - spinner: Drupal.t('Loading...'), - // Add the 'active' class when showing tabs and remove it from siblings. - show: function(event, ui) { - $(ui.tab).parent('li').addClass('active').siblings('li').removeClass('active'); - }, - fx: fx - }) - .addClass('tabs') - .each(function () { - // Assign secondary class to nested tabsets. - var newClass = $(this).parents('.drupal-tabs').size() > 1 ? 'secondary' : 'primary'; - $(this) - .addClass(newClass) - .find('>li:first') - .addClass('first') - .end() - .find('>li:last') - .addClass('last'); - }) - .after('') - .end() - .addClass('tabs-processed') - .each(function () { - if ($(this).is('.tabs-navigation')) { - Drupal.tabs.tabsNavigation(this); - } - }) + try { + $('.drupal-tabs:not(.tabs-processed)', context) + .find('> ul') + .tabs({ + spinner: Drupal.t('Loading...'), + // Add the 'active' class when showing tabs and remove it from siblings. + show: function(event, ui) { + $(ui.tab).parent('li').addClass('active').siblings('li').removeClass('active'); + }, + fx: fx + }) + .addClass('tabs') + .each(function () { + // Assign secondary class to nested tabsets. + var newClass = $(this).parents('.drupal-tabs').size() > 1 ? 'secondary' : 'primary'; + $(this) + .addClass(newClass) + .find('>li:first') + .addClass('first') + .end() + .find('>li:last') + .addClass('last'); + }) + .after('') + .end() + .addClass('tabs-processed') + .each(function () { + if ($(this).is('.tabs-navigation')) { + Drupal.tabs.tabsNavigation(this); + } + }) .show(); + } catch (err) {} }; Drupal.tabs.tabsNavigation = function(elt) {