betaflight-configurator/testing.html

162 lines
2.7 KiB
HTML
Raw Normal View History

2015-10-29 16:27:27 +00:00
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Unbenanntes Dokument</title>
<link type="text/css" rel="stylesheet" href="./js/libraries/switchery/dist/switchery.css" media="all" />
<link type="text/css" rel="stylesheet" href="./main.css" media="all" />
2015-10-29 16:27:27 +00:00
2015-10-30 19:30:27 +00:00
2015-10-29 16:27:27 +00:00
<script type="text/javascript" src="./js/libraries/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="./js/libraries/jquery-ui-1.11.2.min.js"></script>
2015-10-30 19:30:27 +00:00
<script type="text/javascript" src="./js/libraries/switchery/dist/switchery.js"></script>
2015-10-29 16:27:27 +00:00
<style>
body {
}
#fixed_band {
color: #c00;
font: bold 15px arial;
padding: 10px;
margin: 10px;
border: 1px solid #c00;
width: 200px;
top: 0px;
position:absolute;
}
</style>
</head>
<body>
<div class="option">
<label>
2015-10-30 19:30:27 +00:00
<input class="porttoggle"/>
2015-10-29 16:27:27 +00:00
<span i18n="firmwareFlasherNoReboot"></span>
</label>
<label>
2015-10-30 19:30:27 +00:00
<input class="porttoggle" type="checkbox" />
2015-10-29 16:27:27 +00:00
<span i18n="firmwareFlasherNoReboot"></span>
</label>
<span class="description" i18n="firmwareFlasherNoRebootDescription"></span>
</div>
<div id="fixed_band">This div is going to be fixed</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
d<br>
<br>
<br>
<br>
<br><span class="fixfalse">False</span>
2015-10-29 16:27:27 +00:00
<br>
<br><span class="fixtrue">True</span>
2015-10-29 16:27:27 +00:00
<br>
<br>
<br>
<br>
<br>
<br>
<br>
d<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
d<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
d
<script>
2015-10-30 19:30:27 +00:00
var elems = Array.prototype.slice.call(document.querySelectorAll('.porttoggle'));
2015-10-29 16:27:27 +00:00
elems.forEach(function(html) {
var switchery = new Switchery(html,
{
color: '#59aa29',
secondaryColor: '#c4c4c4'
});
});
</script>
<script>
function relative_sticky(id, topSpacing){
if(!topSpacing){ var topSpacing = 0; }
var el_top = parseFloat(document.getElementById(id).getBoundingClientRect().top);
el_top = el_top - parseFloat(document.getElementById(id).style.top);
el_top = el_top * (-1);
el_top = el_top + topSpacing;
if(el_top > 0){
document.getElementById(id).style.top = el_top + "px";
} else{
document.getElementById(id).style.top = "0px";
}
}
window.onscroll = function(){
relative_sticky("fixed_band", 200);
}
</script>
<!--
<script>
$(document).ready(function () {
jQuery(function($) {
function fixDiv() {
var $cache = $('.fixed_band');
$cache.css({
'position': 'fixed',
'bottom': '20px'
});
}
$(window).scroll(fixDiv);
fixDiv();
});
});
</script>
end -->
</body>
</html>