Looking for the old docs site? You can still view it for a limited time here.



Twigkit service for the toggle pane(s) components


  • onTogglePane(panesId, callback, scope)

    When the togglePanes event is fired the callback function will be called.

    Param Type Details
    panesId string

    The id of the toggle panes component where the callback is being fired.

    callback Function

    The function to be called when the cancel event is fired.

    scope Object

    The $scope object for unsubscribing to the event when the scope is destroyed.


    TogglePanesService.onTogglePane('MyPaneId', function (paneNumber) {
     console.log('Pane has been toggled to ' + paneNumber);
    }, $scope);

    TogglePanesService.togglePane('MyPaneId', 1); </code></pre></div></div> </div> </li> <li><h3 id="methods_togglepane">togglePane(panesId, paneNumber)</h3> <div class="togglepane"><div class="lightning-togglepanesservice-togglepane-page"><p>Fires an event to change the currently selected pane for a specific set of panes.</p> </div><h5 id="methods_togglepane_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>panesId</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="lightning-togglepanesservice-togglepane-page"><p>The id of the toggle panes component to fire the toggle against.</p> </div></td></tr><tr><td>paneNumber</td><td><a href="" class="label type-hint type-hint-number">number</a></td><td><div class="lightning-togglepanesservice-togglepane-page"><p>The number of the pane to switch to (0 based so the first pane is 0, the second pane is 1 etc.).</p> </div></td></tr></tbody></table><h4 id="methods_togglepane_example">Example</h4> <div class="example"><div class="lightning-togglepanesservice-togglepane-page"><p>TogglePanesService.togglePane('MyPaneId', 1);</p> </div></div> </div> </li> </ul> </div> </div>