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();
+ 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).on("scroll", function () {
var scrollTop = $(window).scrollTop();
if(scrollTop > 0){
$(sticky).addClass("fixed");
- 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");
+ }
}
-
-// if(scrollTop == 0){
-// $(sticky).removeClass("fixed");
-// $(body).removeClass("f-topbar-fixed");
-// }
+
});
});
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();
+ 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).on("scroll", function () {
var scrollTop = $(window).scrollTop();
if(scrollTop > 0){
$(sticky).addClass("fixed");
- 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");
+ }
}
-
-// if(scrollTop == 0){
-// $(sticky).removeClass("fixed");
-// $(body).removeClass("f-topbar-fixed");
-// }
+
});
});