S
S
seacjs2015-07-26 11:31:47
Yii
seacjs, 2015-07-26 11:31:47

How to make a modal window open on page load (Yii2, bootstrap)?

I set the modal window using the bootstrap extension for yii2. It looks like this:

$modal = Modal::begin([
'header' => '<h2>Модальное окно</h2>',
'toggleButton' => ['label' => 'открыть окно','class' => 'btn btn-default'],
]);
Modal::end();

How can I make the modal open on page load?
Decision:
$modal = Modal::begin([
'header' => '<h2>Модальное окно</h2>',
'toggleButton' => ['label' => 'открыть окно','class' => 'btn btn-default'],
'clientOptions' => ['show' => true],
]);
Modal::end();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
7
7rulnik, 2015-07-26
@7rulnik

Initially, set the modal to a set of classes class="modal fade in"
in responsible for the active state

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question