Answer the question
In order to leave comments, you need to log in
Yii2 how to lower your JS script below the rest?
It turns out that the form generated by ActiveForm overrides my script.
<script>
<script src="/rexit/web/js/someScript.js">// мой скрипт
<script src="/rexit/web/assets/f93372f5/jquery.js">
<script src="/rexit/web/assets/fb4777e0/yii.js">
<script src="/rexit/web/assets/fb4777e0/yii.validation.js">
<script src="/rexit/web/assets/fb4777e0/yii.activeForm.js">
<script src="/rexit/web/assets/98fb4049/js/bootstrap.js">
<script type="text/javascript"> // тут подключается ActiveForm и перезаписывает все что применялось выше.
$this->registerJsFile('@web/js/someScript.js', ['position' => $this::POS_END], 'myScript');
$('#container').hide();
Answer the question
In order to leave comments, you need to log in
www.yiiframework.com/doc-2.0/yii-web-view.html#reg...
depends
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question