MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Collapse

Function Collapse

static/bootstrap/js/bootstrap.js:554–568  ·  view source on GitHub ↗
(element, options)

Source from the content-addressed store, hash-verified

552 // ================================
553
554 var Collapse = function (element, options) {
555 this.$element = $(element)
556 this.options = $.extend({}, Collapse.DEFAULTS, options)
557 this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
558 '[data-toggle="collapse"][data-target="#' + element.id + '"]')
559 this.transitioning = null
560
561 if (this.options.parent) {
562 this.$parent = this.getParent()
563 } else {
564 this.addAriaAndCollapsedClass(this.$element, this.$trigger)
565 }
566
567 if (this.options.toggle) this.toggle()
568 }
569
570 Collapse.VERSION = '3.3.7'
571

Callers

nothing calls this directly

Calls 2

extendMethod · 0.80
$Function · 0.50

Tested by

no test coverage detected