I use bootstap tabs and Im trying to download content via ajax, and not install it in PHP. My code is:
<script type="text/javascript"> function test(e){ console.log(e.target); //load ajax stuff here } </script> <?php $this->widget('bootstrap.widgets.TbTabs', array( 'type'=>'tabs', 'placement'=>'above', // 'above', 'right', 'below' or 'left' 'tabs'=>array( array('label'=>'Ogólne', 'content'=>'Czekaj...', 'active'=>true), array('label'=>'Książka adresów', 'content'=>'Czekaj...'), array('label'=>'Cośtam', 'content'=>'Czekaj...'), ), 'events'=>array('shown'=>'test') )); ?>
However, I keep getting this error: Uncaught TypeError: Object test has no method 'apply' . I tried to create an object, but it still didn't work. Any ideas?
A quick explanation, JS code generated by the framework:
<script type="text/javascript"> jQuery(function($) { jQuery('a[rel="tooltip"]').tooltip(); jQuery('a[rel="popover"]').popover(); jQuery('#yw0').tab('show'); jQuery('#yw0').on('shown', 'test'); jQuery('#collapse_0').collapse({'parent':false,'toggle':false}); }); </script>
Robus source share