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:
6
docs/assets/js/bootstrap-dropdown.js
vendored
6
docs/assets/js/bootstrap-dropdown.js
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user