tomnjerry74 93 Posted December 17, 2020 Share Posted December 17, 2020 On one of my sites, I use one of those buttons that appear after you scroll down a certain amount that allows you to jump to the top of the page: <div class="scrolltop" style="display:none;"><a href="#top" class="d-flex"><i class="fas fa-chevron-up"></i></a></div> <script type="text/javascript"> $(document).scroll(function() { var y = $(this).scrollTop(); if (y > 800) { $('.scrolltop').fadeIn(); } else { $('.scrolltop').fadeOut(); } }); </script> As you can see, there's a div and some javascript that needs to be implemented in order for it to function. My question is, is there an Emby footer or header file where this code can be implemented so that it attaches to all pages? Where would be the best place to insert this? Link to comment Share on other sites More sharing options...
tomnjerry74 93 Posted December 17, 2020 Author Share Posted December 17, 2020 (edited) Well, I've figured out how/where to add this code, but unfortunately it isn't compatible with Emby's scrolling system. If anyone knows a way to successfully add a scroll-to-top button I would very much appreciate it. Edited December 17, 2020 by tomnjerry74 Link to comment Share on other sites More sharing options...
Luke 37028 Posted December 17, 2020 Share Posted December 17, 2020 Yea you'll probably have a hard time due to the custom scrolling needed for virtual scrolling. Link to comment Share on other sites More sharing options...
tomnjerry74 93 Posted December 17, 2020 Author Share Posted December 17, 2020 Thanks for the response. I've gone ahead and just made this a feature request, as I think that's more appropriate. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now