• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 102
  • Last Modified:

Bootstrap Tabs/Dropdowns


How can I edit so that when you change the tab that you're viewing from the dropdown that "Dropdown" changes the to active tab name.
Nathan Riley
Nathan Riley
1 Solution
Rainer JeschorCommented:
do you mean something like this:

The following code will overwrite the dropdown caption
$(".dropdown-menu li a").click(function(){
  var selText = $(this).text();
  $(this).parents('.nav-tabs').find('.dropdown-toggle').html(selText+' <span class="caret"></span>');

Open in new window

Nathan RileyFounderAuthor Commented:
Yes, exactly what I was looking for, thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now