]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixed nested tab elements li activation 13191/head
authorAshley Dawson <ashley@ashleydawson.co.uk>
Wed, 26 Mar 2014 22:21:54 +0000 (22:21 +0000)
committerAshley Dawson <ashley@ashleydawson.co.uk>
Wed, 26 Mar 2014 22:21:54 +0000 (22:21 +0000)
Added closest li instead of direct parent so that you can nest multiple elements within tabs, such as button groups

js/tab.js

index 400cb7b841e6720bc5ffbd589972f441a2d8d51a..74e0a96e82f888d2d8f4062ac79fdc96dea53934 100644 (file)
--- a/js/tab.js
+++ b/js/tab.js
@@ -40,7 +40,7 @@
 
     var $target = $(selector)
 
-    this.activate($this.parent('li'), $ul)
+    this.activate($this.closest('li'), $ul)
     this.activate($target, $target.parent(), function () {
       $this.trigger({
         type: 'shown.bs.tab',