Hi there,
I am using a jquery modal to display messages spit out by:
<?php echo flash(); ?>
This all works fine. However, because the modal initializes on page load, I would only like it to fire IF there is a message to display. So, my thought was to wrap the whole thing in a conditional statement, like the following:
<?php if flash(): ?>
<div class="modal">
<?php echo flash(); ?>
</div>
<?php endif; ?>
However, this particular code does not work. Does anyone have any ideas? As a sidenote, does this approach even seem sound? Thanks in advance!