src/Widgets/Bootstrap/Collapse.php
protected function registerClientEvents()
    {
        if (!empty($this->clientEvents)) {
            $idWidget = $this->options['id'];
            $itemsCount = count($this->items);
            for ($i = 1; $i <= $itemsCount; $i++) {
                $id = $idWidget . '-collapse-' . $i;
                $js = [];
                foreach ($this->clientEvents as $event => $handler) {
                    $js[] = "jQuery('#$id').on('$event', $handler);";
                }
                $this->getView()->registerJs(implode("\n", $js));
            }
        }
    }
protected function registerClientEvents()
    {
        if (!empty($this->clientEvents)) {
            $idWidget = $this->options['id'];
            $itemsCount = count($this->items);
            for ($i = 1; $i <= $itemsCount; $i++) {
                $id = $idWidget . '-collapse-' . $i;
                $js = [];
                foreach ($this->clientEvents as $event => $handler) {
                    $js[] = "jQuery('#$id').on('$event', $handler);";
                }
                $this->getView()->registerJs(implode("\n", $js));
            }
        }
    }
Registers JS event handlers that are listed in [[clientEvents]].