Line 327: | Line 327: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
var scroll_start = 0; | var scroll_start = 0; | ||
+ | var startchange = $('.main-img'); | ||
+ | var offset = startchange.offset(); | ||
$(document).scroll(function() { | $(document).scroll(function() { | ||
scroll_start = $(this).scrollTop(); | scroll_start = $(this).scrollTop(); | ||
− | if(scroll_start > | + | if(scroll_start >offset.bottom) { |
$('.main-container').css('background-color', 'white'); | $('.main-container').css('background-color', 'white'); | ||
$('.droptn').css('color', 'black'); | $('.droptn').css('color', 'black'); | ||
} else { | } else { | ||
$('.main-container').css('background-color', 'none'); | $('.main-container').css('background-color', 'none'); | ||
+ | $('.droptn').css('color', 'white'); | ||
} | } | ||
}); | }); |
Revision as of 12:14, 12 September 2016