Load own jquery files on YII framework


/ Published in: PHP
Save to your folder(s)

Override yii's jquery files and load your own.


Copy this code and paste it in your HTML
  1. En /protected/config/main.php
  2. 'clientScript'=>array(
  3. 'scriptMap'=>array(
  4. 'jquery.js'=>false,
  5. 'jquery.ajaxqueue.js'=>false,
  6. 'jquery.metadata.js'=>false,
  7. ),
  8. ),
  9.  
  10. En protected/views/layouts/main.php
  11.  
  12. <?php
  13. echo CGoogleApi::init();
  14. echo CHtml::script(
  15. CGoogleApi::load('jquery','1.3.2') . "\n" .
  16. CGoogleApi::load('jquery.ajaxqueue.js') . "\n" .
  17. CGoogleApi::load('jquery.metadata.js')
  18. );
  19. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.