forked from state-hiu/Mapgive
-
Notifications
You must be signed in to change notification settings - Fork 1
/
site.js
27 lines (27 loc) · 865 Bytes
/
site.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
---
---
$(function() {
var app = window.app;
$('.language-switcher a').each(function(i, e) {
if (app.permalink.length < 3) return;
$(e).attr('href',
app.baseurl + '/' +
$(e).attr('lang') +
app.permalink.substr(3)
);
});
$('.language-switcher a[lang=' + app.lang + ']').addClass('active');
// contribute banner pops out when hovered over
$('.banner').hover(
function() {
$(this).addClass('active').attr('href',window.app.baseurl + '/' + window.app.lang +'/contribute/');
setTimeout(function(){
$('.banner span').addClass('active');
},300);
},
function() {
$(this).removeClass('active').attr('href','');
$('.banner span').removeClass('active');
}
);
});