Index: trunk/extensions/HeaderTabs/HeaderTabs_body.jq.php |
— | — | @@ -227,14 +227,22 @@ |
228 | 228 | foreach ( $tabs as $i => $tab ) { |
229 | 229 | $tabhtml .= '<li'; |
230 | 230 | if ( $i == 0 ) { |
231 | | - $tabhtml .= ' class="selected"'; |
| 231 | + $tabhtml .= ' class="selected" '; |
| 232 | + } else { // hide selector of all but first tab |
| 233 | + $tabhtml .= ' style="display:none"'; |
232 | 234 | } |
233 | 235 | $tabhtml .= '><a href="#' . $tab['tabid'] . '">'.$tab['title'] . "</a></li>\n"; |
234 | 236 | } |
235 | 237 | $tabhtml .= '</ul>'; |
236 | 238 | |
237 | | - foreach ( $tabs as $tab ) { |
238 | | - $tabhtml .= '<div id="' . $tab['tabid'] . '" class="section-'.$tab['section'].'"><p>' . $tab['tabcontent'] . '</p></div>'; |
| 239 | + foreach ( $tabs as $i => $tab ) { |
| 240 | + $tabhtml .= '<div id="' . $tab['tabid'] . '" class="section-'.$tab['section'].'"'; |
| 241 | + |
| 242 | + if ( $i != 0 ) { // hide content of all but first tab |
| 243 | + $tabhtml .= ' style="display:none"'; |
| 244 | + } |
| 245 | + |
| 246 | + $tabhtml .= '><p>' . $tab['tabcontent'] . '</p></div>'; |
239 | 247 | } |
240 | 248 | $tabhtml .= '</div>'; |
241 | 249 | |
Index: trunk/extensions/HeaderTabs/skins-jquery/ext.headertabs.core.js |
— | — | @@ -23,6 +23,9 @@ |
24 | 24 | |
25 | 25 | var $tabs = $("#headertabs").tabs(); |
26 | 26 | |
| 27 | +$tabs.children('div').removeAttr('style'); |
| 28 | +$tabs.children('ul').children().removeAttr('style'); |
| 29 | + |
27 | 30 | /* follow a # anchor to a tab OR a heading */ |
28 | 31 | var curHash = window.location.hash; |
29 | 32 | if ( curHash.indexOf( "#tab=" ) == 0 ) { |