All posts tagged with 'Bootstrap'

Twitter Bootstrap: Make the default pills more usable

30-Jul-12

The default basic pills from Bootstrap are somewhat useless as they don’t change their state (class=”active”). I use the following javascript snippet to change that: $(’ul.nav.nav-pills li a’).click(function() { $(this).parent().addClass(’active’).siblings().removeClass(’active’); });$(‘ul.nav.nav-pills li a’).click(function() { $(this).parent().addClass(‘active’).siblings().removeClass(‘active’); });

Read the complete article »