I have simple alert message which should show up only when there is error. However I don’t know how to hide message on initialization. If I manually hide the message then error message stays hidden even when there is error.
<div class="alert alert-error">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $error?>
</div>
Try this
make sure that you include bootstrap.js and jquery.js correctly