init
This commit is contained in:
18
assets/js/main.js
Normal file
18
assets/js/main.js
Normal file
@@ -0,0 +1,18 @@
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
|
||||
var mastheadheight = $('.ds-header').outerHeight();
|
||||
//console.log(mastheadheight);
|
||||
$(".ds-banner,.ds-main-section").css("margin-top" , mastheadheight);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if ($(window).scrollTop() >= 10) {
|
||||
$('.ds-header').addClass('ds-fixed-header');
|
||||
}
|
||||
else {
|
||||
$('.ds-header').removeClass('ds-fixed-header');
|
||||
}
|
||||
}).scroll();
|
||||
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user