var slideshow = $("#slideshow");
var body = $("body");
var sticky = $(".sticky");
- var width = $(window).width();
+ var width;
var page_front = $(".page-front");
+ var scrollTop;
$(window).resize( function () {
+ width = $(window).width();
+ scrollTop = $(window).scrollTop();
+ console.log("res" + scrollTop + " : " + 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");
+ $(page_front).css("padding-top", "60px");
}
});
$(window).on("scroll", function () {
- var scrollTop = $(window).scrollTop();
+ width = $(window).width();
+ scrollTop = $(window).scrollTop();
+ console.log("scr" + scrollTop + " : " + width);
if(scrollTop > 0){
$(sticky).addClass("fixed");
- 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");
- }
- }
+ }
+ 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", "60px");
+ }
});
var slideshow = $("#slideshow");
var body = $("body");
var sticky = $(".sticky");
- var width = $(window).width();
+ var width;
var page_front = $(".page-front");
+ var scrollTop;
$(window).resize( function () {
+ width = $(window).width();
+ scrollTop = $(window).scrollTop();
+ console.log("res" + scrollTop + " : " + 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");
+ $(page_front).css("padding-top", "60px");
}
});
$(window).on("scroll", function () {
- var scrollTop = $(window).scrollTop();
+ width = $(window).width();
+ scrollTop = $(window).scrollTop();
+ console.log("scr" + scrollTop + " : " + width);
if(scrollTop > 0){
$(sticky).addClass("fixed");
- 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");
- }
- }
+ }
+ 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", "60px");
+ }
});