1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-27 22:09:04 +02:00

adding dropdowns to tabs by refactoring the shizzzz out of them

This commit is contained in:
Mark Otto
2011-08-26 20:38:23 -07:00
parent b9c9f1d8d6
commit 4f67e135dc
5 changed files with 400 additions and 384 deletions

View File

@@ -5,6 +5,7 @@ $(document).ready(function(){
prettyPrint();
// scroll spy logic
// ================
@@ -19,7 +20,6 @@ $(document).ready(function(){
return $(id).offset().top;
});
function setButton(id) {
nav.parent("li").removeClass('active');
$(nav[$.inArray(id, targets)]).parent("li").addClass('active');
@@ -48,10 +48,10 @@ $(document).ready(function(){
// ===============================
$("body").bind("click", function (e) {
$('a.menu').parent("li").removeClass("open");
$('.dropdown-toggle').parent("li").removeClass("open");
});
$("a.menu").click(function (e) {
$(".dropdown-toggle").click(function (e) {
var $li = $(this).parent("li").toggleClass('open');
return false;
});