I have checked similar topics but did not find a satisfactory answer. My website is very long in height so it takes long to load. I have a fixed div which should only appear when user scrolls until the buttom. But the hidden div appears when I enter the page, I don't want it to appear in the loading process. Any help appreciated.
.homepage
{
width: 76px;
height: 62px;
position: fixed;
top: 85%;
right: 182px;
background-image: url(anasayfa.png);
border-radius: 10px;
}
.homepage:hover
{
top: 85.3%;
}
.scrollup
{
width: 76px;
height: 62px;
background-image: url(yukaricik.png);
position: fixed;
top: 85%;
right: 96px;
border-radius: 10px;
}
.scrollup:hover
{
top: 85.3%;
}
.nextpage {
width: 76px;
height: 62px;
position: fixed;
top: 85%;
right: 10px;
background-image: url(sonrakisayfa.png);
border-radius: 10px;
}
.nextpage:hover
{
top: 85.3%;
}
<script>
$(document).ready(function () {
$(window).scroll(function () {
if ($(window).scrollTop() > 13500) {
$(".homepage").fadeIn();
} else {
$(".homepage").fadeOut();
}
});
});
$(document).ready(function() {
$(window).scroll(function(){
if ($(window).scrollTop() > 13500){
$(".scrollup").fadeIn();
} else {
$(".scrollup").fadeOut();
}
});
});
$(document).ready(function(){
$(".scrollup").click(function(){
$('html, body').animate({scrollTop: '0px'}, 300);
});
});
$(document).ready(function () {
$(window).scroll(function () {
if ($(window).scrollTop() > 13500) {
$(".nextpage").fadeIn();
} else {
$(".nextpage").fadeOut();
}
});
});
</script>
display: none;.