View difference between Paste ID: 1p5S7EFy and M2G5Wv85
SHOW: | | - or go back to the newest paste.
1
diff HeaderTabs-HEAD-7bfd0ae/HeaderTabs_body.jq.php HeaderTabs/HeaderTabs_body.jq.php
2
17c17,21
3
<               return '<div id="nomoretabs"></div>';
4
---
5
>               $text = '';
6
>               if($args['default']){
7-
>                    $text .= '<div id="defaulttab">'.$args['default'].'</div>';
7+
>                    $text .= '<div style="display:none" id="defaulttab">'.$args['default'].'</div>';
8
>                 }
9
>               return $text.'<div id="nomoretabs"></div>';
10
43a48,52
11
>                 //Grab the default tab
12
>                 $defaultTab = '';
13-
>                 if ( preg_match('|<div id="defaulttab">(.+?)</div>|', $aboveandbelow[0],$matches) === 1 ){
13+
>                 if ( preg_match('|<div style="display:none" id="defaulttab">(.+?)</div>|', $aboveandbelow[0],$matches) === 1 ){
14
>                   $defaultTab = $matches[1];
15
>                 }
16-
232,233c241,246
16+
232,235c241,248
17
<                       if ( $i == 0 ) {
18
<                               $tabhtml .= ' class="selected" ';
19
<                       } else { // hide selector of all but first tab
20
<                               $tabhtml .= ' class="unselected"';
21
---
22
>                       if ($defaultTab != ''){
23
>                         if($defaultTab == $tab['title']){
24
>                           $tabhtml .= ' class="selected" ';
25
>                         }
26-
235c248
26+
27
>                         $tabhtml .= ' class="selected" ';
28
>                       }else { // hide selector of all but first tab
29
>                         $tabhtml .= ' class="unselected"';
30
242,245c255,259
31
<                       $tabhtml .= '<div id="' . $tab['tabid'] . '" class="section-'.$tab['section'];
32
<
33
<                       if ( $i != 0 ) { // hide content of all but first tab
34
<                               $tabhtml .= ' unselected';
35
---
36
>                       $tabhtml .= '<div id="' . $tab['tabid'] . '" class="section-'.$tab['section'];
37
>                       if ( $defaultTab == '' && $i != 0 ) { // hide content of all but first tab
38
>                         $tabhtml .= ' unselected';
39
>                       }elseif ( $defaultTab != '' && $tab['title'] != $defaultTab ){
40
>                         $tabhtml .= ' unselected';