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

Bootstrap Tabs/Dropdowns

http://getbootstrap.com/javascript/#tabs

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.
0
Nathan Riley
Asked:
Nathan Riley
1 Solution
 
Rainer JeschorCommented:
Hi,
do you mean something like this:
http://www.bootply.com/Q417tBFEIY

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


HTH
Rainer
0
 
Nathan RileyFounderAuthor Commented:
Yes, exactly what I was looking for, thanks!
0
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