1
|
jQuery(document).ready(function() {
|
2
|
|
3
|
function getFootnoteClassName(object){
|
4
|
return '.'+jQuery(object).attr('href').substr(1);
|
5
|
}
|
6
|
|
7
|
function getFootnoteKeyClassName(object){
|
8
|
return '.'+jQuery(object).attr('href').substr(1).replace(/-/gi, '-key-') + ' a';
|
9
|
}
|
10
|
|
11
|
jQuery('span.footnote-key a').mouseover(function(e){
|
12
|
var fnClassName = getFootnoteClassName(this);
|
13
|
var fnKeyClassName = getFootnoteKeyClassName(this);
|
14
|
jQuery('.footnote').css('background-color', 'transparent').css('background-color', 'transparent').removeClass('active');
|
15
|
jQuery('span.footnote-key a').css('background-color', 'transparent').css('background-color', 'transparent').removeClass('active');
|
16
|
jQuery(fnClassName).css('background-color', 'yellow');
|
17
|
jQuery(fnKeyClassName).css('background-color', 'yellow');
|
18
|
}
|
19
|
).mouseout(function(e){
|
20
|
var fnClassName = getFootnoteClassName(this);
|
21
|
var fnKeyClassName = getFootnoteKeyClassName(this);
|
22
|
jQuery(fnClassName).not('.active').css('background-color', 'transparent');
|
23
|
jQuery(fnKeyClassName).not('.active').css('background-color', 'transparent');
|
24
|
}
|
25
|
).click(function(e){
|
26
|
var fnClassName = getFootnoteClassName(this);
|
27
|
var fnKeyClassName = getFootnoteKeyClassName(this);
|
28
|
jQuery('.footnote').css('background-color', 'transparent').removeClass('active');
|
29
|
jQuery('span.footnote-key a').css('background-color', 'transparent').removeClass('active');
|
30
|
jQuery(fnClassName).css('background-color', 'yellow').addClass('active');
|
31
|
jQuery(fnKeyClassName).css('background-color', 'yellow').addClass('active');
|
32
|
});
|
33
|
|
34
|
});
|