2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-20 20:00:36 +03:00

don't open dropdown if target is disabled

This commit is contained in:
Jacob Thornton
2012-04-14 21:44:57 -07:00
parent 82267d48ff
commit d65f7f204a
2 changed files with 39 additions and 1 deletions
+5 -1
View File
@@ -40,10 +40,14 @@
, toggle: function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, selector
, $parent
, isActive
if ($this.is('.disabled, :disabled')) return
selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7