this is my code now:
<script type="text/javascript">
$(document).ready(function() {
if($.cookie('msg') == 0)
{
$('#myModal').modal('show');
$.cookie('msg', 1);
}
});
</script>
on page load the model shows but when i refresh it keeps showing which it should only show once. the $.cookie is from https://github.com/carhartl/jquery-cookie
update:
this worked: the 'hide' didnt work for some reason
<script type="text/javascript">
$(document).ready(function() {
if($.cookie('msg') == null)
{
$('#myModal').modal('show');
$.cookie('msg', 'str');
}
else
{
$("div#myModal.modal").css('display','none');
}
});
</script>