PHP code example of yidas / yii2-jquery

1. Go to this page and download the library: Download yidas/yii2-jquery library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yidas / yii2-jquery example snippets


yidas\yii\jquery\JqueryAsset

\yidas\yii\jquery\JqueryAsset::register($this);

namespace app\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/site.css',
    ];
    public $js = [
    ];
    public $depends = [
        'yidas\yii\jquery\JqueryAsset'
    ];
}

'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\yii\jquery\JqueryAsset' => [
                'version' => '2.2.4',
            ],
        ],
    ],
],

'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\yii\jquery\JqueryAsset' => [
                'cdnVersion' => '2.2.4',
                'cdn' => true,
            ],
        ],
    ],
],

'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\yii\jquery\JqueryAsset' => [
                'cdn' => true,
                'cdnJS' => ['https://code.jquery.com/jquery-2.2.4.min.js'],
            ],
        ],
    ],

],