$form $form : \TbActiveForm Type \TbActiveForm — when created via TbActiveForm, this attribute is set to the form that renders the widget
$events $events : array Type array — the javascript events Example: <pre> 'events'=>array( 'switchChange'=>'js:function(event, state) { console.log(this); // DOM element console.log(event); // jQuery event console.log(state); // true | false }' ) </pre>
registerClientScript() registerClientScript(integer $id) Registers required css and js files Parameters integer $id the id of the toggle button