Answer the question
In order to leave comments, you need to log in
Why doesn't the modal window open?
I am using Bootstrap3 and Yii2 with yii2-scroll-pager plugin
<div class="col-lg-4 col-sm-6 col-xs-12 item">
<a href="#" data-toggle="modal" data-target=".pop-up-<?= $model->id ?>">
<img src="/<?= $model[url] ?>" class="thumbnail img-responsive">
</a>
</div>
<div class="modal fade pop-up-<?= $model->id ?>" tabindex="-1" role="dialog" aria-labelledby="myLargeModalPhoto" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<img src="/<?= $model[url] ?>" class="img-responsive img-rounded center-block" alt="">
</div>
<div class="modal-footer">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">share</button>
</div>
</div>
</div>
</div>
$dataProvider
configured to issue 6 photos. pop-up-<?= $model->id ?
true. What is the problem?
Answer the question
In order to leave comments, you need to log in
Is the modal script enabled? It is connected in yii2 when the widget is called, if you manually created a modal window, then you need to manually connect the script
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question