Close one modal and open a new modal with one button
I am using bootstrap and have one that would like to link to the other . I can't figure it out and I'm currently using modal.close()
and .modal('show')
, but it doesn't work.
$('a#to3heart').click(function(){
$('#portfolioModal2').modal({onShow: function (dialog) {
$.modal.close()
$('#portfolioModal1').modal('show');
return false;
}
});
});
+3
source to share
2 answers
using:
$("#modal1").modal('hide');
$("#modal2").modal('show');
+2
source to share