Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff HeaderTabs-HEAD-7bfd0ae/HeaderTabs_body.jq.php HeaderTabs/HeaderTabs_body.jq.php
- 17c17,21
- < return '<div id="nomoretabs"></div>';
- ---
- > $text = '';
- > if($args['default']){
- > $text .= '<div style="display:none" id="defaulttab">'.$args['default'].'</div>';
- > }
- > return $text.'<div id="nomoretabs"></div>';
- 43a48,52
- > //Grab the default tab
- > $defaultTab = '';
- > if ( preg_match('|<div style="display:none" id="defaulttab">(.+?)</div>|', $aboveandbelow[0],$matches) === 1 ){
- > $defaultTab = $matches[1];
- > }
- 232,235c241,248
- < if ( $i == 0 ) {
- < $tabhtml .= ' class="selected" ';
- < } else { // hide selector of all but first tab
- < $tabhtml .= ' class="unselected"';
- ---
- > if ($defaultTab != ''){
- > if($defaultTab == $tab['title']){
- > $tabhtml .= ' class="selected" ';
- > }
- > }elseif ( $i == 0 ) {
- > $tabhtml .= ' class="selected" ';
- > }else { // hide selector of all but first tab
- > $tabhtml .= ' class="unselected"';
- 242,245c255,259
- < $tabhtml .= '<div id="' . $tab['tabid'] . '" class="section-'.$tab['section'];
- <
- < if ( $i != 0 ) { // hide content of all but first tab
- < $tabhtml .= ' unselected';
- ---
- > $tabhtml .= '<div id="' . $tab['tabid'] . '" class="section-'.$tab['section'];
- > if ( $defaultTab == '' && $i != 0 ) { // hide content of all but first tab
- > $tabhtml .= ' unselected';
- > }elseif ( $defaultTab != '' && $tab['title'] != $defaultTab ){
- > $tabhtml .= ' unselected';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement