this.title = $(this.element).find('img').attr('alt');
}
});
+
var slideshow = $("#slideshow");
var body = $("body");
var sticky = $(".sticky");
+ var width = $(window).width();
+
$(window).on("scroll", function () {
var scrollTop = $(window).scrollTop();
if(scrollTop > 0){
$(sticky).addClass("fixed");
- if(scrollTop > 319 && scrollTop < 641 ){
+ if(width > 319 && width < 641 ){
$(slideshow).css("margin-top", "140px");
- } else if(scrollTop > 639 && scrollTop < 1025){
+ } else if(width > 639 && width < 1025){
// $(slideshow).css("margin-top", "140px");
}
}
this.title = $(this.element).find('img').attr('alt');
}
});
+
var slideshow = $("#slideshow");
var body = $("body");
var sticky = $(".sticky");
+ var width = $(window).width();
+
$(window).on("scroll", function () {
var scrollTop = $(window).scrollTop();
if(scrollTop > 0){
$(sticky).addClass("fixed");
- if(scrollTop > 319 && scrollTop < 641 ){
+ if(width > 319 && width < 641 ){
$(slideshow).css("margin-top", "140px");
- } else if(scrollTop > 639 && scrollTop < 1025){
+ } else if(width > 639 && width < 1025){
// $(slideshow).css("margin-top", "140px");
}
}