navbar link hash fixed, footer links fixed
This commit is contained in:
parent
3ed2399337
commit
5550867870
6 changed files with 80 additions and 59 deletions
|
|
@ -107,7 +107,7 @@ h6 {
|
|||
.navbar-right .highlights-dropdown .dropdown-menu > li > a{
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
font-family: 'Lato-Light', sans-serif;
|
||||
font-family: 'Lato', sans-serif;
|
||||
padding: 1px 10px !important;
|
||||
background: transparent;
|
||||
color: #333;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,32 @@
|
|||
// also declared in datacenterlight/js/main.js
|
||||
function _initNavUrl() {
|
||||
// $('.url').click(function(event) {
|
||||
// event.preventDefault();
|
||||
// var href = $(this).attr('href');
|
||||
// $('.navbar-collapse').removeClass('in');
|
||||
// $('.navbar-collapse').addClass('collapsing');
|
||||
// if ($(href).length) {
|
||||
// $('html, body').animate({
|
||||
// scrollTop: $(href).offset().top
|
||||
// }, 1000);
|
||||
// } else {
|
||||
// window.location.href = '/datacenterlight' + href;
|
||||
// }
|
||||
// });
|
||||
$('.url-init').each(function(idx, el) {
|
||||
var $this = $(el);
|
||||
var currentPath = window.location.pathname;
|
||||
var thisPaths = $this.attr('href').split('#')
|
||||
if ($this.hasClass('dropdown-toggle') && window.matchMedia("(max-width: 767px)").matches) {
|
||||
$this.removeClass('url-init');
|
||||
$this.attr('href', '');
|
||||
} else if ($('#'+thisPaths[1]).length) {
|
||||
$this.removeClass('url-init').addClass('url');
|
||||
$this.attr('href', '#' + thisPaths[1]);
|
||||
} else {
|
||||
$this.removeClass('url-init');
|
||||
}
|
||||
});
|
||||
$('.url').click(function(event) {
|
||||
event.preventDefault();
|
||||
var href = $(this).attr('href');
|
||||
|
|
@ -9,8 +36,6 @@ function _initNavUrl() {
|
|||
$('html, body').animate({
|
||||
scrollTop: $(href).offset().top
|
||||
}, 1000);
|
||||
} else {
|
||||
window.location.href = '/datacenterlight' + href;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue