Fix some errors

This commit is contained in:
Cristian Deluxe 2016-12-07 05:59:38 +01:00
parent 42b5c38c21
commit 293b5cb410
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
* Sanitize all tab links
*/
$( "ul#tabs>li>a" ).each(function( index ) {
var eid = element_clear($( this ).attr('href')).replace(/[^#\w]/gi,'_');
var eid = $( this ).attr('href').replace(/[^#\w]/gi,'_');
$( this ).attr('href', eid);
});
@ -10,7 +10,7 @@ $( "ul#tabs>li>a" ).each(function( index ) {
* Sanitize all tab ids
*/
$( "div#munin_nodeview_tab>div" ).each(function( index ) {
var eid = element_clear($( this ).attr('id')).replace(/[^\w]/gi,'_');
var eid = $( this ).attr('id').replace(/[^\w]/gi,'_');
$( this ).attr('id', eid);
});
@ -27,5 +27,5 @@ $(document).ready(function() {
});
$(window).on('popstate', function() {
var anchor = location.hash || $("a[data-toggle=tab]").first().attr("href");
$('a[href="' + location.hash + '"]').tab('show');
$('a[href="' + anchor + '"]').tab('show');
});