Files
virtual-kubelet/website/assets/js/app.js
Luc Perkins 318edee630 Usage docs (#501)
* Add setup and usage docs

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Finish initial version of setup doc

* Add YAML config file for CLI docs

* Finish CLI shortcode

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Fix scrolling on mobile

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Finish first version of usage doc

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Remove go install section, modify CSS for CLI docs, and fix typo

Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-01-24 11:01:42 -08:00

34 lines
621 B
JavaScript

function anchorJs() {
if ($('.is-docs-page').length > 0) {
anchors.options = {
icon: '#'
}
anchors.add('.cli h2, .content h2, .content h3, .content h4');
}
}
function scrollFadeInOut(threshold, element) {
//element.hide();
$(window).scroll(function() {
if ($(this).scrollTop() > threshold) {
element.fadeIn();
} else {
element.fadeOut();
}
});
}
function navbarScrollToggle() {
const navbar = $('.is-home-page .navbar');
const heroHeight = $('.hero').height();
scrollFadeInOut(heroHeight, navbar);
}
$(function() {
anchorJs();
navbarScrollToggle();
});