noeldelgado / gemini-scrollbar

:first_quarter_moon: Custom overlay-scrollbars with native scrolling mechanism for web applications
https://noeldelgado.github.io/gemini-scrollbar/
MIT License
429 stars 63 forks source link

conflict with scroll to top jquery code ! #28

Closed elostoraweb closed 8 years ago

elostoraweb commented 8 years ago

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;
});

}); `

the above code not work with gemini scrollbar can you help me ? thanks

noeldelgado commented 8 years ago

Hi, can you update the demo to actually use gemini-scrollbar? That way I may be able to help you. Thanks.

elostoraweb commented 8 years ago

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 :)

noeldelgado commented 8 years ago

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.

elostoraweb commented 8 years ago

hi @noeldelgado it's ok now :+1: Thank for clarification , you've solved the problem Regards :)

elostoraweb commented 8 years ago

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

noeldelgado commented 8 years ago

Sorry, I don't understand, did you forget to save the latest changes on jsbin? I cannot see any sticky header on there.

elostoraweb commented 8 years ago

sorry @noeldelgado , i update jsfiddle now https://jsfiddle.net/ahmedcom/wpqo60rw/

elostoraweb commented 8 years ago

@noeldelgado a waiting your reply thanks

noeldelgado commented 8 years ago

https://jsfiddle.net/wpqo60rw/3/

elostoraweb commented 8 years ago

@noeldelgado thanks million :+1: