-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
26 lines (26 loc) · 951 Bytes
/
main.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
// set footer colapse for mobile
$(window).on('load resize', function() {
$("footer .col-md-4").each(function(index, el) {
var link = $(this).children('a');
var ul = $(this).find('ul');
if ($(window).width() < 768) {
$(link).attr({
'class': 'footerCollapseTitle collapsed',
'data-toggle': 'collapse',
'aria-expanded': 'false',
'href': '#collapseFooter' + index,
'aria-controls': 'collapseFooter' + index
});
$(ul).attr({
'id': 'collapseFooter' + index,
'class': 'collapse'
});
} else {
$(link).attr({
'class': 'footerCollapseTitle',
'href': 'javascript:;'
}).removeAttr('data-toggle aria-expanded aria-controls');
$(ul).removeAttr('id class');
};
});
}).trigger('resize');