I am using yii framework with Boostrap and Booster. On my web page i need to use jQuery version 1.9.1. When i include it eg
$cs->registerScriptFile($baseUrl . '/js/jquery-1.11.2.min.js')
i start getting all kinds of Jquery errors eg jQuery(...).rating is not a function ect..
I need to include the jquery1.11.2 in order to have all functionalities working. What should i do , i tried disabling js loading in booster , i tried updating bootstrap and booster i tried placing the jquery file in different sections of my page but all my attempts have been futile. Please help me identifie the problem
By default, Yii has own JQuery library. In bootstrap, trying to load Yii Core JS files. If you load your JQuery then it will conflict and will gives you errors. There are 2 ways to overcome.
You can ask Yii to take your Jquery file instead of Core one in main.php >> components section you need to add as below
'clientScript'=>array(
'packages'=>array(
'jquery'=>array(
'baseUrl'=> 'Yii::app()->baseUrl',
'js'=>array('1.7.2/jquery.min.js'),
)
),
),
Hope this helps !!
Regards