Branded UI Fixed
This commit is contained in:
20
bd-national-template/content/assets/js/topofpage.js
Normal file
20
bd-national-template/content/assets/js/topofpage.js
Normal file
@@ -0,0 +1,20 @@
|
||||
$(document).ready(function(){
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 50) {
|
||||
$('#back-to-top').fadeIn();
|
||||
} else {
|
||||
$('#back-to-top').fadeOut();
|
||||
}
|
||||
});
|
||||
// scroll body to 0px on click
|
||||
$('#back-to-top').click(function () {
|
||||
$('#back-to-top').tooltip('hide');
|
||||
$('body,html').animate({
|
||||
scrollTop: 0
|
||||
}, 800);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#back-to-top').tooltip('show');
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user