forked from magento/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevdocs.js
77 lines (42 loc) · 1.29 KB
/
devdocs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
function devdocs(){
// ** Search **
if ($.cookie('searchResultsState') ==1) {
//show search results page
$('#searchResultsBox').fadeIn(300);
$('.searchResultsBack').fadeIn(1200);
} else {
$.cookie('searchResultsState', '0');
$('#searchResultsBox').fadeOut(300);
$('.searchResultsBack').fadeOut(1200);
}
$('form').submit(function(event) {
$('#searchResultsBox').fadeIn(300);
$('.searchResultsBack').fadeIn(1200);
$.cookie('searchResultsState', '1');
});
$('DIV.searchResultsBoxClose').click(function(){
$('#searchResultsBox').fadeOut(300);
$('.searchResultsBack').fadeOut(1200);
$.cookie('searchResultsState','0');
});
// ** Menu **
var menustate ="";
if ( $('LI.level3Child').is("LI.active")) {
menustate = $('LI.active').attr('data-menunode');
$('#' + menustate).show(); //show parent
$('#' + menustate).removeClass('caretRight').addClass('caretDown') //submenu open indication
$('.' + menustate).show(); //show submenu
}
var dog = "";
$('.level3Parent').click(function(){
dog = $(this).attr('id');
if($('.' + dog).is(":visible")) {
$(this).removeClass('caretDown').addClass('caretRight')
$('.' + dog).slideUp(200);
} else {
$(this).removeClass('caretRight').addClass('caretDown')
$('.' + dog).slideDown(200);
}
return false;
});
} //end devdocs