aboutsummaryrefslogtreecommitdiff
path: root/js/dropdown.js
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2014-02-16 20:06:31 +0100
committerHeinrich Fenkart <[email protected]>2014-02-16 21:00:04 +0100
commit8a78bc065f866763607f104907b7a2ac9fa6ceec (patch)
tree5c13df1beae3be4e5168c22a76ce42a399f3045f /js/dropdown.js
parentaccc95ccd63f8aa903fa07bea55ef34794d84cc5 (diff)
downloadbootstrap-8a78bc065f866763607f104907b7a2ac9fa6ceec.tar.xz
bootstrap-8a78bc065f866763607f104907b7a2ac9fa6ceec.zip
Remove event aliases from JavaScript
Makes life for people with custom jQuery builds excluding event aliases much easier.
Diffstat (limited to 'js/dropdown.js')
-rw-r--r--js/dropdown.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/dropdown.js b/js/dropdown.js
index 43d7ae3ea..6e206a0d1 100644
--- a/js/dropdown.js
+++ b/js/dropdown.js
@@ -44,7 +44,7 @@
.toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget)
- $this.focus()
+ $this.trigger('focus')
}
return false
@@ -64,8 +64,8 @@
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus()
- return $this.click()
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
+ return $this.trigger('click')
}
var desc = ' li:not(.divider):visible a'
@@ -79,7 +79,7 @@
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
- $items.eq(index).focus()
+ $items.eq(index).trigger('focus')
}
function clearMenus(e) {