Skip to content

Instantly share code, notes, and snippets.

@loschke
Last active February 9, 2020 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loschke/2d522a5126d6a9e4f9e58ccf747722ea to your computer and use it in GitHub Desktop.
Save loschke/2d522a5126d6a9e4f9e58ccf747722ea to your computer and use it in GitHub Desktop.
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="js/scroll-top.js"></script>
<!-- Initialisieren -->
<script type="text/javascript">
$(document).ready(function(){
$('.top').UItoTop();
});
</script>
<style>
/* TO TOP*/
#toTop-right {
display:none;
text-decoration:none;
position:fixed;
bottom:20px;
right:20px;
outline:none;
}
#toTop-left {
display:none;
text-decoration:none;
position:fixed;
bottom:20px;
left:20px;
outline:none;
}
#toTop-center {
display:none;
text-decoration:none;
position:fixed;
bottom:10px;
left:50%;
margin-left:-20px; /*Feintuning je nach Inhalt */
outline:none;
}
</style>
var defaults = {
autoLinkPos: 'toTop-right', //toTop-left, toTop-center
autoLinkClass: 'btn btn-large btn-danger', // example:'badge badge-warning' 'label label-info'
autoLinkText: 'nach oben', //Linktext, optional wenn Icon vorhanden
autoLinkIcon: 'icon-chevron-up icon-white', //Bootstrap Icon, optional wenn Text vorhanden
easingType: 'easeOutBounce', //default without Easing: 'linear' or 'swing'
min: 400, //Anzahl gescrollter Pixel bis zum Einblenden
inDelay:500,
outDelay:500,
scrollSpeed: 750, //Scrolldauer
contentLinkClass: 'top' //class Name der manuellen Contentlinks
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment