vendor/assets/javascripts/bootstrap/bootstrap-collapse.js in jombo-0.0.1.beta10 vs vendor/assets/javascripts/bootstrap/bootstrap-collapse.js in jombo-0.0.1.beta11
- old
+ new
@@ -15,23 +15,23 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
-(function( $ ){
+!function( $ ){
"use strict"
var Collapse = function ( element, options ) {
this.$element = $(element)
- this.settings = $.extend({}, $.fn.collapse.defaults, options)
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
- if (this.settings["parent"]) {
- this.$parent = $(this.settings["parent"])
+ if (this.options["parent"]) {
+ this.$parent = $(this.options["parent"])
}
- this.settings.toggle && this.toggle()
+ this.options.toggle && this.toggle()
}
Collapse.prototype = {
constructor: Collapse
@@ -114,22 +114,22 @@
$.fn.collapse.defaults = {
toggle: true
}
- $.fn.collapse.Collapse = Collapse
+ $.fn.collapse.Constructor = Collapse
/* COLLAPSIBLE DATA-API
* ==================== */
$(function () {
- $('body').delegate('[data-toggle=collapse]', 'click.collapse.data-api', function ( e ) {
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
var $this = $(this)
, target = $this.attr('data-target') || $this.attr('href')
, option = $(target).data('collapse') ? 'toggle' : $this.data()
- e.preventDefault()
+ e.preventDefault()
$(target).collapse(option)
})
})
-})( window.jQuery || window.ender )
+}( window.jQuery )
\ No newline at end of file