K
K
Ken Jee2016-08-28 14:09:32
JavaScript
Ken Jee, 2016-08-28 14:09:32

How to update jQuery to the latest version in YII2?

After deploying YII2 Advanced, it turned out that the project uses JQuery version 2.2.4, but I want to use the latest version (currently 3.1.0). How to update the library to the latest version? Preferably through a dependency manager.

Installation via Composer:
f8cee2c62674431cb70d7dfcf23e3b36.jpg

Page footer:
97defc379be3443a801bf6d89e937dfd.jpg

jQuery version:
b3e8b394a2b64ab787b683bd6f19943f.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
izac, 2016-08-28
@izac

Try adding to config

'assetManager'=>array(
            'bundles' => array(
                'yii\web\JqueryAsset' => array(
                    'sourcePath' => null,
                    'js' => array(
                         '//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js',
                    ),
                ),
            )
        )

N
Nikita, 2016-08-28
@bitver

Specify version in composer.json and update. Generally googling.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question