Using JQuery

I’m sure this has been answered before but I’ve been searching and haven’t come up with anything. I’m trying to use JQuery in my code. The way I’m importing it at the moment is as follows:

<script type="text/javascript" src = "<?php echo Yii::app()->request->baseUrl; ?>/assets/6d07a0e9/jquery.js"></script>

I’m doubtful if this is the way we’re supposed to include JQuery, though. How should I be importing it?


<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>



And you are right: You should never do any manual includes from the assets folder.