Test Failed
Push — main ( d9df25...7cc2e0 )
by chief
07:27
created

channel.js ➔ selectWatch   B

Complexity

Conditions 5

Size

Total Lines 29
Code Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 5
eloc 21
c 0
b 0
f 0
dl 0
loc 29
rs 8.9093
1
function selectWatch(id) {
2
    if(id == "#info-panel") {
3
        $("#info-panel").fadeIn(75);
4
        $("#favorite-panel").fadeOut(5);
5
        $("#playlist-panel").fadeOut(5);
6
        $("#flag-panel").fadeOut(5);
7
    }
8
9
    if(id == "#favorite-panel") {
10
        $("#info-panel").fadeOut(5);
11
        $("#favorite-panel").fadeIn(75);
12
        $("#playlist-panel").fadeOut(5);
13
        $("#flag-panel").fadeOut(5);
14
    }
15
16
    if(id == "#share-panel") {
17
        $("#info-panel").fadeOut(5);
18
        $("#favorite-panel").fadeOut(5);
19
        $("#playlist-panel").fadeIn(75);
20
        $("#flag-panel").fadeOut(5);
21
    }
22
23
    if(id == "#flag-panel") {
24
        $("#info-panel").fadeOut(5);
25
        $("#favorite-panel").fadeOut(5);
26
        $("#playlist-panel").fadeOut(5);
27
        $("#flag-panel").fadeIn(75);
28
    }
29
}
30
31
function main() {
32
    $("#www-main").fadeIn(75);
33
    $("#www-grid").fadeOut(75);
34
}
35
36
function grid() {
37
    $("#www-main").fadeOut(75);
38
    $("#www-grid").fadeIn(75);
39
}