I have created a button in the right bottom of screen and footer in bottom of the screen and i have make the button it position: fixed I want to change position to absolute on scrolling down reach the footer my css:
.affix-top {
position:fixed;
}
.affix {
position:absolute;
}
my script:
$("#myBtn").affix({
offset: {
top: $("#footer").outerHeight(true),
bottom: null
}
});
my footer:
<footer class="footer" id="footer">
<div class="container">
<div class="row">
<div class="col-sm-3">
<h4 class="title">KYK Restaurant ★</h4>
<p>THE BEST Delivery Restaurants - ★★★★★</p>
</div>
</div>
</div>