1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-04 07:04:02 +00:00
Munin-Contrib/templates/munstrap/static/js/munstrap.min.js
2017-01-28 01:23:48 +01:00

2 lines
555 B
JavaScript

$("ul#tabs>li>a").each(function(a){a=$(this).attr("href").replace(/[^#\w]/gi,"_");$(this).attr("href",a)});$("div#munin_nodeview_tab>div").each(function(a){a=$(this).attr("id").replace(/[^\w]/gi,"_");$(this).attr("id",a)});$(document).ready(function(){location.hash&&$('a[href="'+location.hash+'"]').tab("show");$(document.body).on("click","a[data-toggle=tab]",function(a){location.hash=this.getAttribute("href")})});
$(window).on("popstate",function(){var a=location.hash||$("a[data-toggle=tab]").first().attr("href");$('a[href="'+a+'"]').tab("show")});