Jump to content

Jump-to-Top Button?


tomnjerry74

Recommended Posts

tomnjerry74

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

tomnjerry74

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 by tomnjerry74
Link to comment
Share on other sites

tomnjerry74

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...