app/assets/javascripts/twitter/bootstrap/dropdown.js in bootstrap-sass-rails-3.0.2.1 vs app/assets/javascripts/twitter/bootstrap/dropdown.js in bootstrap-sass-rails-3.0.3.0
- old
+ new
@@ -1,7 +1,7 @@
/* ========================================================================
- * Bootstrap: dropdown.js v3.0.2
+ * Bootstrap: dropdown.js v3.0.3
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,11 +24,11 @@
// =========================
var backdrop = '.dropdown-backdrop'
var toggle = '[data-toggle=dropdown]'
var Dropdown = function (element) {
- var $el = $(element).on('click.bs.dropdown', this.toggle)
+ $(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
@@ -39,11 +39,11 @@
clearMenus()
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we we use a backdrop because click events don't delegate
+ // if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
}
$parent.trigger(e = $.Event('show.bs.dropdown'))
@@ -121,12 +121,12 @@
var old = $.fn.dropdown
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
- var data = $this.data('dropdown')
+ var data = $this.data('bs.dropdown')
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown