Merge pull request #77 from asolove/scroll-sidebar-to-active-section
On page load, scroll sidebar to active section. Resolves #21.
This commit is contained in:
commit
50504282fb
|
@ -50,6 +50,13 @@ $( document ).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Scroll sidebar to current active section
|
||||||
|
var activeSection = sidebar.find(".active");
|
||||||
|
if(activeSection.length) {
|
||||||
|
sidebar.scrollTop(activeSection.offset().top);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Print button
|
// Print button
|
||||||
$("#print-button").click(function(){
|
$("#print-button").click(function(){
|
||||||
var printWindow = window.open("print.html");
|
var printWindow = window.open("print.html");
|
||||||
|
|
Loading…
Reference in New Issue