mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-06-03 08:46:49 +00:00
25 lines
571 B
HTML
25 lines
571 B
HTML
{% comment %}
|
|
Add content to be output at the bottom of each page. (You might use this for analytics scripts, for example)
|
|
{% endcomment %}
|
|
<script>
|
|
$(document).ready(function() {
|
|
var stickyNavTop = $('nav').offset().top;
|
|
|
|
var stickyNav = function(){
|
|
var scrollTop = $(window).scrollTop();
|
|
|
|
if (scrollTop > stickyNavTop) {
|
|
$('nav').addClass('sticky');
|
|
} else {
|
|
$('nav').removeClass('sticky');
|
|
}
|
|
};
|
|
|
|
stickyNav();
|
|
|
|
$(window).scroll(function() {
|
|
stickyNav();
|
|
});
|
|
});
|
|
</script>
|