Skip to content

Commit

Permalink
fix tabs bug (/?page=user&id=2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariez committed Mar 29, 2016
1 parent cc72c8d commit b2ef073
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions js/phpList3ToBootstrap.js
@@ -1,4 +1,5 @@
$(window).load(function() {

var myfunction = function() {

/* MAIN MENU */
$('#menuTop').addClass('collapse navbar-collapse navbar-left');
Expand Down Expand Up @@ -46,8 +47,8 @@ $(window).load(function() {
$('.tabbed ul.nav-tabs').attr('role','tablist');
$('.tabbed ul.nav-tabs li').attr('role','presentation');
$('.tabbed ul.nav-tabs li a').attr({ 'role':'tab', 'data-toggle':'tab' });
$('.tabbed div').not('.tabbed ul div').wrapAll('<div class="tab-content"/>');
$('.tabbed .tab-content div').not('.tabbed .tab-content div div').addClass('tab-pane fade');
$('.tabbed div[id]').not('.tabbed ul div').wrapAll('<div class="tab-content"/>');
$('.tabbed .tab-content div[id]').addClass('tab-pane fade');
$('.tabbed .tab-pane').attr('role','tabpanel');
$('.tabbed ul.nav-tabs li a:first').tab('show');

Expand Down Expand Up @@ -113,11 +114,13 @@ $(window).load(function() {
/* show page after loading */
$('body').removeClass('invisible');

});
}



/******** RESPONSIVE TABS *******/
$.getScript("ui/bootlist/js/bootstrap-tabcollapse.js", function(){
$('.tabbed').tabCollapse();
});

$( window ).load(myfunction);

0 comments on commit b2ef073

Please sign in to comment.