when i want to detect the bottom of my page i use this code which worked fine in a test-file (link below):
$(window).scroll(function() {
$(window).scrollTop() + $(window).height() == $(document).height(){
alert(at bottom);
}
}
But in my final file the exact same code only detects scrolling to the top. can anyone see the mistake or provide a better solution?
Link to test-file: www.warthunder-skins.de/test/
Link to normal file: www.warthunder-skins.de/skins/