I'm using a plugin called Reveal, and trying to fire it based on whether a variable is present in the URL (i.e. www.mysite.com?status=new). I have tested the GET status code (works fine, echoed it) and also set up reveal to work when a button is pressed. Both work flawlessly. However, the goal is to fire the event if the status == new. This is my code:
<?
if($status == 'new'){
echo '<script type="text/javascript">$(\'#myModal\').reveal();
</script>';
}
?>
Doesn't work :/ Any help? I've tried many combinations with this and nothing seems to be working. My code is placed near the bottom of the page (in the body section), not sure if that matters..
EDIT: Also tried this (didn't work):
<?
if($status == 'new'){
echo '<script type="text/javascript">
$(document).ready(function() {
e.preventDefault();
$(\'#myModal\').reveal();
});
</script>';
}
?>
Zach