mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
Added back to top button on long scroll
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.bwssystems.HABridge</groupId>
|
||||
<artifactId>ha-bridge</artifactId>
|
||||
<version>5.3.0RC3</version>
|
||||
<version>5.3.0RC4</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>HA Bridge</name>
|
||||
|
||||
@@ -17,6 +17,23 @@
|
||||
<link href="css/strength-meter.min.css" rel="stylesheet">
|
||||
<link href="css/colorpicker.min.css" rel="stylesheet">
|
||||
|
||||
<style id="compiled-css" type="text/css">
|
||||
.goToTop
|
||||
{
|
||||
position: fixed;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
z-index: 100000;
|
||||
cursor: pointer;
|
||||
margin: 10px;
|
||||
-moz-opacity: 0.60;
|
||||
opacity: .60;
|
||||
filter: alpha(opacity=60);
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="js/html5shiv.min.js"></script>
|
||||
<script type="text/javascript" src="js/respond.min.js"></script>
|
||||
@@ -75,6 +92,10 @@
|
||||
|
||||
|
||||
</div>
|
||||
<span class="goToTop">
|
||||
<button type="button" class="btn btn-light"><i class="glyphicon glyphicon-chevron-up"></i> Back to Top</button>
|
||||
</span>
|
||||
<!-- <input type="button" class="goToTop" value="Back to Top" style="display:none;background-color:blue" /> -->
|
||||
|
||||
<script src="js/jquery-1.11.3.min.js"></script>
|
||||
<script src="js/angular.min.js"></script>
|
||||
@@ -93,5 +114,35 @@
|
||||
<script src="js/ng-file-upload-shim.min.js"></script>
|
||||
<script src="js/ng-file-upload.min.js"></script>
|
||||
<script src="scripts/app.js"></script>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
$(window).load(function(){
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.goToTop').fadeIn();
|
||||
} else {
|
||||
$('.goToTop').fadeOut();
|
||||
}
|
||||
});
|
||||
$('.goToTop').click(function () {
|
||||
$("html, body").animate({ scrollTop: 0 }, 1000);
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
// tell the embed parent frame the height of the content
|
||||
if (window.parent && window.parent.parent){
|
||||
window.parent.parent.postMessage(["resultsFrame", {
|
||||
height: document.body.getBoundingClientRect().height,
|
||||
slug: "fvdrw83s"
|
||||
}], "*")
|
||||
}
|
||||
|
||||
// always overwrite window.name, in case users try to set it manually
|
||||
window.name = "result"
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user