Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Tab content jumbles up on IE9 and Google Chrome when rendered through program and the tab key is a number. It has been also tested by adding quotes to the '$tabs' key value (e.g. $tabs['159']) Below is the example of the code used.
<?php
$tabs[159] = array(
'title' => t('abc'),
'type' => 'view',
'vid' => 'my_view',
'display' => 'classes',
'args' => '159',
);
$tabs[134] = array(
'title' => t('xyz'),
'type' => 'view',
'vid' => 'my_view',
'display' => 'classes',
'args' => '134',
);
$quicktabs['qtid'] = 'any-unique-id';
$quicktabs['tabs'] = $tabs;
$quicktabs['style'] = 'Excel';
$quicktabs['ajax'] = FALSE;
print theme('quicktabs', $quicktabs);
?>
Comments
Comment #1
sudip.dey CreditAttribution: sudip.dey commentedThe quicktabs content do not work in IE 9 if the numeric has been used in the key.
While iterating through the objects to hide and show the current object, IE 9 and Chrome gets the wrong object reference to active for the clicked tab.
It works fine in IE9 and Chrome if strings have been used in the key.
The above code should be used like below or a small change to the quicktabs.js file will resolve this issue and work fine with the numeric in key also.
Here '-tab' has been added to make the key String rather than only numeric. This will resolve the issue and the respective tab content will displayed correctly.
Fix in the quicktabs.js file:
We will post this fix soon as a patch of this module.
Comment #2
arijeet.bannerjee CreditAttribution: arijeet.bannerjee commented#1 fix works. I am waiting for your patch.
Comment #2.0
arijeet.bannerjee CreditAttribution: arijeet.bannerjee commentedspelling corrected.
Comment #3
netw3rker CreditAttribution: netw3rker commentedComment #4
netw3rker CreditAttribution: netw3rker commentedThis is resolved in successive versions of QT.