var body = $("body");
var sticky = $(".sticky");
var width = $(window).width();
+ var page_front = $(".page-front");
+ function check_window_width(){
+ if(width > 319 && width < 641 ){
+ $(page_front).css("padding-top", "200px");
+ } else if(width > 639 && width < 1025){
+ $(page_front).css("padding-top", "155px");
+ } else if(width > 1024){
+ $(page_front).css("padding-top", "20px");
+ }
+ }
+ $(window).resize( function () {
+ check_window_width();
+ });
$(window).on("scroll", function () {
var scrollTop = $(window).scrollTop();
if(scrollTop > 0){
$(sticky).addClass("fixed");
- if(width > 319 && width < 641 ){
- $(slideshow).css("margin-top", "140px");
- } else if(width > 639 && width < 1025){
-// $(slideshow).css("margin-top", "140px");
- }
+ check_window_width();
}
// if(scrollTop == 0){
var body = $("body");
var sticky = $(".sticky");
var width = $(window).width();
+ var page_front = $(".page-front");
+ function check_window_width(){
+ if(width > 319 && width < 641 ){
+ $(page_front).css("padding-top", "200px");
+ } else if(width > 639 && width < 1025){
+ $(page_front).css("padding-top", "155px");
+ } else if(width > 1024){
+ $(page_front).css("padding-top", "20px");
+ }
+ }
+ $(window).resize( function () {
+ check_window_width();
+ });
$(window).on("scroll", function () {
var scrollTop = $(window).scrollTop();
if(scrollTop > 0){
$(sticky).addClass("fixed");
- if(width > 319 && width < 641 ){
- $(slideshow).css("margin-top", "140px");
- } else if(width > 639 && width < 1025){
-// $(slideshow).css("margin-top", "140px");
- }
+ check_window_width();
}
// if(scrollTop == 0){