I want to call congrats Bootstrap modal on condition: call show modal when some notice text is showing.
Condition is correct. I tried it with simple alerts and everything worked.
Here is my code:
if ( $('.alert').text() == 'Signed in successfully.' ) {
$('#congrats').show();
}
Here is my html :
<div class="modal fade hide" id="congrats">
There is no errors in browser’s console.
What I’m doing wrong ?
Sorry, for some reason I found that syntax has changed or I missed it. Here is working variant: