V
V
Vladimir2017-08-24 10:43:24
Yii
Vladimir, 2017-08-24 10:43:24

How to change the order of scripts in Yii2?

Good day! I connected the extension and it pulls up its scripts (jquery.js and dropzone.min.js) I already have my jquery connected, how can I make it so that it does not connect its own, but uses the one that already exists. The version of the jquery extension is 2.2.4, and I have 3.2.1. He connects these scripts to the top of the footer. This is how the structure looks like:

<script src="/assets/67d19a55/jquery.js"></script>
<script src="/assets/aa09c499/dropzone/dist/min/dropzone.min.js"></script>
<script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/jquery.fullpage.min.js"></script>
<script src="/js/nouislider.min.js"></script>
<script src="/js/wNumb.js"></script>
<script src="/js/script.js"></script>

How can I make it not connect, but
<script src="/assets/67d19a55/jquery.js"></script>
<script src="/assets/aa09c499/dropzone/dist/min/dropzone.min.js"></script>

was after . Thanks in advance for the replies! UPD: And here is the extension itself if you need https://github.com/perminder-klair/yii2-dropzone
<script src="/js/jquery-3.2.1.min.js"></script>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mitaichik, 2017-08-24
@MasterGerold

You need to use resources: https://github.com/yiisoft/yii2/blob/master/docs/g...
There you can specify the order by specifying dependencies (Resource Dependencies section), and map resources (Resource Binding section) to connect one jquery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question