A
A
andrew_goldsmith2016-03-11 18:32:13
Yii
andrew_goldsmith, 2016-03-11 18:32:13

How to open a modal window when clicking on an image?

At the moment, there is a code that works when the button is clicked.

<?php
  Modal::begin([
    'size' => 'modal-lg',
    'header' => '<h2>Заголовок</h2>',
    'toggleButton' => ['Модальное окно', //тут нужна картинка
      'label' => 'button',
      'tag' => 'button',
      'class' => 'btn btn-danger',	
    ],
    ]);
  echo 'Содержимое окна';
  Modal::end();
  ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2016-03-11
@andrew_goldsmith

And if you try the standard bootstrap layout? It's easier that way, I think.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question