conflict with scroll to top jquery code !
elostoraweb opened this issue · comments
Hello
thanks for a great work
gemini scrollbar has a conflict with scrollTop code , please see it here in jsfiddle
http://jsfiddle.net/neeklamy/RpPEe/
<script>
$(document).ready(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('#backtop').fadeIn();
} else {
$('#backtop').fadeOut();
}
});
$('#backtop').click(function () {
$("html, body").animate({
scrollTop: 0
}, 600);
return false;
});
});
</script>
`
the above code not work with gemini scrollbar
can you help me ?
thanks
Hi, can you update the demo to actually use gemini-scrollbar? That way I may be able to help you.
Thanks.
Hi , this is working demo
http://mrsoom.com/scroll-issue/
sorry can't update Jsfiddle with actually demo files , it's don't work there !
https://jsfiddle.net/5xrnnpju/
thanks alot :)
Hi @elostoraweb, here is the updated demo https://jsfiddle.net/5xrnnpju/3/. When using gemini-scrollbar, you should use the getViewElement
method to actually interact with the scroller, I pointed it out on the readme, let me know if that wasn't clear, also, pls let me know if this works for you.
hi @noeldelgado
it's ok now 👍 Thank for clarification , you've solved the problem
Regards :)
Hi @noeldelgado
please , i used this code to make Bootstrap Navbar sticky when scrolling page .
i edit it with getViewElement to avoid conflict with gemini scrollbar ,but not work
https://jsfiddle.net/5xrnnpju/3/
can you merge it in your edited example above ?
thanks alot
Sorry, I don't understand, did you forget to save the latest changes on jsbin? I cannot see any sticky header on there.
sorry @noeldelgado , i update jsfiddle now
https://jsfiddle.net/ahmedcom/wpqo60rw/
@noeldelgado a waiting your reply
thanks
@noeldelgado thanks million 👍