I have a problem with my web. I add an image in the right of my content and I set it's style with position:fixed, but when I scroll down to my web's footer, this image is pressed by my web's footer. So how can I do to hide this image when this is near my web's footer or this image stack up my web's footer? Thanks for your help!!
Hide the element when $(document).height()-$(window).scrollTop()
less than a particular value
Demo:-
$(document).ready(function () {
$("#scrolldown").show('slow');
$(window).scroll(function (e) {
e.preventDefault();
//console.log($(document).height()+'-'+$(window).scrollTop());
if ($(document).height()-$(window).scrollTop() < 500) {
$("#scrolldown").hide('slow');
}
else {
$("#scrolldown").show('slow');
}
});
});
#pagewrap{
height:1000px;
}
#scrolldown {
position: fixed;
color: white;
padding: 10px 30px;
background: red;
bottom: 30px;
right: 30px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="pagewrap">
<h1>Demo</h1>
<h2><a href="http://webdesignerwall.com/tutorials/animated-scroll-to-top">test</a></h2>
<div id="scrolldown">
i ll hide @ bottom
</div>
</div>
Try using: Position: relative; left: 0px; right: 0px; adjust to fit
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I have ui grid in my applicationI want to give visual appearance to user if grid is accessed using keyboard , user is able to navigate in grid using up/down key , can select the row using spacebar
I made a border transition for a div in CSS that basically has the border become visible in a clock-work manner
I have a jquery slider called pgwslidemasteri want to show the slider caption in a div that can to change it and add a tag to that