How to use built-in jquery core? what should I publish and where?
How to use built-in jquery core? what should I publish and where?
Two ways:
Yii::app()->clientScript->registerCoreScript('jquery');
<?php echo CHtml::coreScript('jquery'); ?>
This actually produces an error:
<?php echo CHtml::coreScript('jquery'); ?>
There is no coreScript method in CHtml.
In the new versions you should do this:
Yii::app()->clientScript->registerCoreScript('jquery');