Answer the question
In order to leave comments, you need to log in
Yii2, Pjax. How to make JS scripts work after Pjax has completed?
tried like this
<?php
//$js = '$(function(){alert(123);})';
//$this->registerJs($js, $this::POS_END);
$this->registerJsFile('/static/js/dynamic.js', ['depends' => [\app\assets\AppAsset::className()]]);?>
<?php \yii\widgets\Pjax::end(); ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question