-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfooter.js
More file actions
27 lines (23 loc) · 753 Bytes
/
footer.js
File metadata and controls
27 lines (23 loc) · 753 Bytes
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
$(document).ready(function() {
fixHeader();
fixFooter();
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
});
$(window).resize(fixFooter);
$("#navbarSupportedContent").resize(fixFooter);
function fixHeader() {
var newWidth = $("#profile-drop").width() + 70;
$("#profile-drop").width(newWidth);
}
function fixFooter() {
var docHeight = $(window).height();
var footerHeight = $('#footer').height();
var footerTop = $('#footer').position().top + footerHeight;
if (footerTop < docHeight)
$('#footer').css('margin-top', 20 + (docHeight - footerTop) + 'px');
}
$("#searchbar").keyup(function(){
$("#searchbtn").attr("href", "/product/search/index.php?searchterm=" + $(this).val());
});