PHP code example of panix / wgt-fancybox

1. Go to this page and download the library: Download panix/wgt-fancybox 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/ */

    

panix / wgt-fancybox example snippets



echo \panix\ext\fancybox\Fancybox::widget(['target' => 'a.fancybox-image']);

// or use options

echo \panix\ext\fancybox\Fancybox::widget([
    'target' => 'a.fancybox-image',
    'options' => [
        //..
        'onInit'=> new \yii\web\JsExpression('function(){
            console.log("Fancybox onInit");
        }')
    ]
]);