Hiding an error message div with setTimeout not working using Smarty
- by Donald
Hi guys,
I'm trying to hide an error message div using a javascript function setTimeout after a specified time but it gives me errors that its a wrong smarty syntax, i've never used smarty before so i would really appreciate it if anyone can help me get up to speed with this syntax
My code is as follows
{if $error_message != ""}
<script type="text/javascript">
setTimeout(function(){$('error').hide(); }, 1000);
</script>
<div id="error" class='error_message'>
{$error_message}
</div>
{/if}
Thanks in advance