[eluser]ludovic_r[/eluser]
Hello all,
I've a little problem that I can't fix myself :'( Here it is :
I've made a newsletter with the "Form" helper and everything work fine. The only thing I want is to add some magical effects on the error messages like a FadeIn when an error message appear and so on.
That's what I tried :
Code:
<head>
[removed]
$(function(){
$(document).mousemove(function(){
$(".errors").fadeIn(500);
});
});
[removed]
<style type="text/css">
.errors{
display:none;
}
</style>
</head>
<body>
<h2>test view</h2>
<?php echo form_open('email/send'); ?>
<p>
<label for="name">Email address: </label>
<input placeholder="Write here" type="text" name="email" id="email" value="<?php echo set_value('email'); ?>">
</p>
<?php echo form_submit('submit', 'Submit'); ?>
<?php echo validation_errors('<p class="errors">'); ?>
<?php echo form_close(); ?>
</body>
</html>
As you can see at the end I have the "validation_errors" with the class "errors" and I tried to add a jQuery script with a FadeIn and it works well but only when the "mousemove" event is called.
All I want to do is to have this FadeIn when the error message appear (like : "please put a valide mail") Not on mousemove event.
Anyone can help me? It would be very helpful!
Many thanks!