YII1 how to set "anchor" for putting Jquery code there

211 Views Asked by At

Now I am working with one old system Which were developed with using YII 1 framework.

Yii1 form using some jquery code for form validation and put this code at the end before </body> tag.

I need to make YII1 form to put its validation code a bit above because at the end (before </body> tag) I have my js code.

In Yii2 It is easy to make by using some anchor like this

$this->endBody()

Is There any Way in Yii1 to set up place in layout to put JS code into that place ?

Thanks in advance

1

There are 1 best solutions below

0
Jobayer Ahmed On

You just add your js file like this in content section or in your html form:

<script src="<?=Yii::app()->theme->baseUrl; ?>/js/bootstrap.min.js"></script>