34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
How to register scripts and css
Comparing
#13
with
#14
Revision #14 was created by
oligalma
on Oct 2, 2015, 2:20:45 AM.
to register raw JavaScripts (like Google Analytics), we must add "CClientScript::POS_END"
« Previous (#13)
Content
[...]
$(\'#mydiv\').slideUp();
})
');
```
However, to register raw JavaScripts (like Google Analytics), we
do this
must add "CClientScript::POS_END"
:
```php
Yii::app()->clientScript->registerScript('myjavascript', '
var _gaq = _gaq || [];
[...]