diff --git a/docs/assets/js/bootstrap-tabs.js b/docs/assets/js/bootstrap-tabs.js index 21386f4cf3..029ccc65c3 100644 --- a/docs/assets/js/bootstrap-tabs.js +++ b/docs/assets/js/bootstrap-tabs.js @@ -11,17 +11,17 @@ , $ul = $(e.liveFired) , $controlled - if (/^#/.test(href)) { + if (/^#\w+/.test(href)) { e.preventDefault() if ($this.hasClass('active')) { return } - $controlled = $('#' + $ul.attr('aria-controls')) + $href = $(href) activate($this.parent('li'), $ul) - activate($(href, $controlled), $controlled) + activate($href, $href.parent()) } } @@ -31,7 +31,7 @@ $.fn.tabs = $.fn.pills = function () { return this.each(function () { - $(this).delegate('.tabs > li > a, .pills > li > a', 'click', tab) + $(this).delegate('.tabs > li > a, .pills > li > a, .dropdown-menu > li > a', 'click', tab) }) } diff --git a/docs/javascript.html b/docs/javascript.html index 2efb415314..932bfc27e3 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -99,8 +99,8 @@ $('#modal-content').modal({