18 parent::__construct($js);
19 $this->uiName=
"collapse";
22 public function attach($identifier) {
23 parent::attach($identifier);
24 $this->js->attr($identifier,
"data-toggle",
"collapse",
true);
28 $this->jsCodes []=
new JsCode(
' $(function () {$("%identifier%").click();});');
37 return $this->
addEvent(
"show.bs.collapse", $jsCode);
46 return $this->
addEvent(
"shown.bs.collapse", $jsCode);
55 return $this->
addEvent(
"hide.bs.collapse", $jsCode);
64 return $this->
addEvent(
"hidden.bs.collapse", $jsCode);
68 foreach ( $this->events as $event => $jsCode ) {
69 $this->jquery_code_for_compile []=
"$( \"".$this->collapsed.
"\" ).on(\"".$event.
"\" , function (e) {".$jsCode.
"});";
onHide($jsCode)
This event is fired immediately when the hide method has been called.
Composant Twitter Bootstrap Collapse.
onHidden($jsCode)
This event is fired when a collapse element has been hidden from the user (will wait for CSS transiti...
addEvent($event, $jsCode)
onShow($jsCode)
This event fires immediately when the show instance method is called.
onShown($jsCode)
This event is fired when a collapse element has been made visible to the user (will wait for CSS tran...