Hiding an error message div with setTimeout not working using Smarty
Posted
by
Donald
on Stack Overflow
See other posts from Stack Overflow
or by Donald
Published on 2011-01-07T12:47:58Z
Indexed on
2011/01/07
12:53 UTC
Read the original article
Hit count: 178
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
© Stack Overflow or respective owner