Created
November 11, 2016 08:31
-
-
Save gagimilicevic/bf712859b1b5748f3c6b387098213140 to your computer and use it in GitHub Desktop.
Find active element and activate its parent bootstrap tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$( all_items ).each( function( index ) { | |
if( $( this ).attr( 'class' ) == 'active' ) { | |
var active_atr = $(this).closest('.tab-pane').attr('id'); | |
$('a[href="#' + active_atr + '"]').tab('show'); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment