diff --git a/static/js/extra.js b/static/js/extra.js new file mode 100644 index 0000000..243b0bd --- /dev/null +++ b/static/js/extra.js @@ -0,0 +1,9 @@ +$(document).ready(function () { + var url = window.location; + $('.navbar-top').find('.active').removeClass('active'); + $('.navbar-top li a').each(function () { + if (this.href == url) { + $(this).parent().addClass('active'); + } + }); + }); diff --git a/templates/default-layout-wrapper.hamlet b/templates/default-layout-wrapper.hamlet index f1a65bd..37a94f5 100644 --- a/templates/default-layout-wrapper.hamlet +++ b/templates/default-layout-wrapper.hamlet @@ -23,6 +23,7 @@ $newline never