1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

some more js love - update the docs with tabs/pills plugin

This commit is contained in:
Jacob Thornton
2011-09-08 20:21:03 -07:00
parent 346122a0c7
commit 5960711d0f
11 changed files with 143 additions and 120 deletions

View File

@@ -3,8 +3,10 @@
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
var selector = 'a.menu, .dropdown-toggle'
function clearMenus() {
$('a.menu').parent('li').removeClass('open')
$(selector).parent('li').removeClass('open')
}
$(function () {
@@ -13,7 +15,7 @@
$.fn.dropdown = function ( options ) {
return this.each(function () {
$(this).delegate('a.menu', 'click', function (e) {
$(this).delegate(selector, 'click', function (e) {
clearMenus()
$(this).parent('li').toggleClass('open')
return false