MCPcopy Create free account
hub / github.com/Exrick/xpay / Section

Function Section

xpay-code/src/main/resources/static/assets/js/jquery.collapse.js:86–110  ·  view source on GitHub ↗
($el, parent)

Source from the content-addressed store, hash-verified

84
85 // Section constructor
86 function Section($el, parent) {
87
88 if(!parent.options.clickQuery) $el.wrapInner('<a href="#"/>');
89
90 $.extend(this, {
91 isOpen : false,
92 $summary : $el.attr("data-collapse-summary",""),
93 $details : $el.next(),
94 options: parent.options,
95 parent: parent
96 });
97 parent.sections.push(this);
98
99 // Check current state of section
100 var state = parent.states[this._index()];
101
102 if(state === 0) {
103 this.close(true)
104 }
105 else if(this.$summary.is(".open") || state === 1) {
106 this.open(true);
107 } else {
108 this.close(true)
109 }
110 }
111
112 Section.prototype = {
113 toggle : function() {

Callers

nothing calls this directly

Calls 2

closeMethod · 0.80
openMethod · 0.80

Tested by

no test coverage detected