File tree 1 file changed +10
-22
lines changed
1 file changed +10
-22
lines changed Original file line number Diff line number Diff line change 23
23
activeId = id ;
24
24
}
25
25
26
+ console . log ( "ActiveId: " + activeId ) ;
27
+
28
+ var scopeWrapper = document . getElementById ( "scope" ) ;
26
29
27
30
switch ( activeId ) {
28
31
case "outline" :
29
- showSet ( "outline" ) ;
30
- hideSet ( "summary" ) ;
31
- hideSet ( "details" ) ;
32
+ showSet ( scopeWrapper , "outline" ) ;
32
33
break ;
33
34
case "summary" :
34
- hideSet ( "outline" ) ;
35
- showSet ( "summary" ) ;
36
- hideSet ( "details" ) ;
35
+ showSet ( scopeWrapper , "summary" ) ;
37
36
break ;
38
37
case "details" :
39
- hideSet ( "outline" ) ;
40
- hideSet ( "summary" ) ;
41
- showSet ( "details" ) ;
38
+ showSet ( scopeWrapper , "details" ) ;
42
39
break ;
43
40
}
44
41
}
45
- function hideSet ( id ) {
46
- var allEl = selection ( id ) ;
47
- hideClassNames = id + " scope-hidden" ;
48
- for ( var e = 0 ; e < allEl . length ; e ++ ) {
49
- allEl [ e ] . className = hideClassNames ;
50
- }
51
- }
52
- function showSet ( id ) {
53
- var allEl = selection ( id ) ,
54
- showClassNames = id + " scope-visible" ;
55
- for ( var e = 0 ; e < allEl . length ; e ++ ) {
56
- allEl [ e ] . className = showClassNames ;
57
- }
42
+
43
+ function showSet ( wrapper , scope ) {
44
+ console . log ( "Changing scope" ) ;
45
+ wrapper . className = scope ;
58
46
}
59
47
function selection ( identifier ) {
60
48
var allEl = document . getElementsByClassName ( identifier ) ;
You can’t perform that action at this time.
0 commit comments