Passed
Push — master ( e1d21b...121756 )
by Anthony
02:12
created

assets/js/popups/flash-messages.js   A

Complexity

Total Complexity 5
Complexity/F 1.25

Size

Lines of Code 19
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
nc 1
dl 0
loc 19
rs 10
c 1
b 0
f 0
wmc 5
mnd 1
bc 5
fnc 4
bpm 1.25
cpm 1.25
noi 0
1
$(document).ready(function() {
2
    var alert = $('.module-flashmessage');
3
    
4
    if (alert.length > 0) {
5
        alert.hide().slideDown(500);
6
        
7
        alert.click(function() {
8
            $(this).slideUp();
9
        });
10
        
11
        setTimeout(function() {
12
            $(".module-flashmessage").slideUp();
13
        }, 10000);
14
        
15
        setTimeout(function() {
16
            $(".module-flashmessage").remove();
17
        }, 12000)
18
    }
19
});