php - Foundation() is undefined when CListView is in the page -
i have yii layout, called main
, loads css , javascript, correctly ordered.
so, have 2 views, 1 have pure html, , other 1 have :
<?php $dataprovider=new cactivedataprovider('agenda'); $dataprovider->pagination->pagesize=5; $this->widget('zii.widgets.clistview', array( 'dataprovider'=>$dataprovider, 'enablepagination'=>true, 'itemview'=>'_agenda', // refers partial view named '_agenda' 'pager' => array( 'class' => 'clinkpager', 'header' => false, 'htmloptions' => array('class' => 'pager'), 'maxbuttoncount' => '10', 'cssfile'=>'css/my.css', ), )); ?>
my problem :
the second 1 throw exception undefined not function
, aim line $(document).foundation();
in code.
is error throws, , both have same javascripts , css imported.
they incompatible?
solved, had conflicts foundation's jquery , yii's jquery.
the solution use @ top :
<?php yii::app()->clientscript->registercorescript('jquery'); ?>
remove others jquery , move foundation.min.js
bottom.
Comments
Post a Comment