Yiibooster Bootbox Close Event

Hi,

I have a modal window popup and another popup must be shown after the first is closed. Problem is that I don’t know what how to set the event on window popup close.

I use Yiibooster and the html generated when 1st popup is on screen:


<div class="bootbox modal fade in" aria-hidden="false">

<div class="modal-body mytape">...content...</div>

</div>

Have found that in bootbox.js we have


$(".bootbox").on("hide", function() { 

        alert("agfas");

     });

But nothing happens. Also found other few solutions but without success.

Any ideas?

P.S I know it’s more js question than yii, but it appeared while using Yiibooster so I hope someone here can help.

Have you tried


$(".bootbox").on("hidden", function() { 

        alert("agfas");

     });

or


$('.bootbox').on('hidden.bs.modal', function () {

  alert("agfas");

})

See

Twitter Bootstrap

Twitter Bootstrap v2.3.2