blob: 0625a91dad15e319738ea7c2180bd1e3964001ad (
plain)
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
|
// Init sidebar
$(function() {
var activeItem,
helpList = $('#js-help-sidebar .js-topic')
$('#js-help-sidebar .js-guides').each(function(){
//if($(this).find('.disable').length == 0){
$(this).children().hide()
//}
})
$('#js-help-sidebar .js-topic h3 a').click(function(){
var clickedTopic = $(this).parents('.js-topic'),
topicGuides = clickedTopic.find('.js-guides li')
if(activeItem != clickedTopic.index()){
if(helpList.eq(activeItem)){
helpList.eq(activeItem).find('.js-guides li').toggle(100)
}
activeItem = clickedTopic.index()
topicGuides.toggle(100)
} else {
activeItem = undefined
topicGuides.toggle(100)
}
return false
})
$('.help-search .search-box').focus(function(){
$(this).css('background-position','0px -25px')
})
$('.help-search .search-box').focusout(function(){
if($(this).val() == ''){
$(this).css('background-position','0px 0px')
}
})
});
|