2016-09-07 16:10:48 -04:00
|
|
|
$( document ).ready(function() {
|
|
|
|
|
2020-09-19 21:21:35 +02:00
|
|
|
$('#mysidebar').height($(".nav").height());
|
|
|
|
|
|
|
|
// this script says, if the height of the viewport is greater than 800px, then insert position-fixed class,
|
|
|
|
// which makes the nav bar float in a fixed position as your scroll. If you have a lot of nav items,
|
|
|
|
// this height may not work for you.
|
2016-09-07 16:10:48 -04:00
|
|
|
var h = $(window).height();
|
|
|
|
//console.log (h);
|
|
|
|
if (h > 800) {
|
2020-09-19 21:21:35 +02:00
|
|
|
$( "#mysidebar" ).attr("class", "nav position-fixed");
|
2016-09-07 16:10:48 -04:00
|
|
|
}
|
2020-09-19 21:21:35 +02:00
|
|
|
|
2016-09-07 16:10:48 -04:00
|
|
|
// activate tooltips. although this is a bootstrap js function, it must be activated this way in your theme.
|
|
|
|
$('[data-toggle="tooltip"]').tooltip({
|
|
|
|
placement : 'top'
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* AnchorJS
|
|
|
|
*/
|
|
|
|
anchors.add('h2,h3,h4,h5');
|
|
|
|
|
|
|
|
});
|