@cryptotaxi247 / netdata-1 / commits / a250f75bb

change #hash while scrolling to enable restore after page refresh

demon committed Jun 1, 2016 at 00:12 UTC a250f75bbeefde29c5ef2d168486fa9eae279dc7
1 file changed +11 -1
web/index.html
+11 -1
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html>
1 +<!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <title>netdata dashboard</title>
@@ -2427,6 +2427,16 @@ function finalizePage() {
2427 offset: $(window).height() / 3 // controls the diff of the <hX> element to the top, to select it
2428 });
2429
2430 + $('#sidebar').on('activate.bs.scrollspy', function (e)
2431 + {
2432 + var el = $(e.target);
2433 + if (el.find('ul').size() == 0)
2434 + {
2435 + var href = el.find('a').attr('href');
2436 + document.location.hash = href;
2437 + };
2438 + });
2439 +
2440 document.getElementById('footer').style.display = 'block';
2441
2442