Calling a jQuery function in a link printed by jQuery
Hello everyone!
I've searching a lot since then I started programming in jQuery. To now I got stucked and I didn't found anything.
I developed a login code that works like a charm, but the trouble is:
If the user mistype his login or password he got a message and a Try Again link, that looks like:
- <div class="logout">Try Again</div>
Then it should be interpreted by jQuery in this "fuction":
- $(".logout").click(function() {
- $.post('bin/logout.php',{ }, function(logout){
- $('#logincases').html("Here goes the html of the login form").hide().fadeIn(1000);
- })
- });
But, somehow, when I click in "Try Again" it do a very weird act. It actualy shows the form, but don't hide the errors messages how it shoult (see next code) and when I submit it the page reloads and the form is empty and working.
- $(".Submit").click(function() {
- $('.error').hide();
- ...continue with the login.
Can some good soul help me? 
Thanks!