I am a bit of a beginner when it comes to jQuery, as you will probably be able to guess from the attempt at getting something to work below!
Basically, the application of this is to validate a form, and show / hide helpful messages / congratulations. This part of the script I've managed to work out (after all, it's just if / else and .show() or .hide() ), but I managed to confuse myself when it comes to allowing the submit button to be pressed (by changing the value and disabeled state). I have worked out the changing of the value, but, the if / else statement isn't changing depending on the form values. What I expect it to be doing (it's an old scrip.aculo.us script, that I changed to jQuery), is validating each and every input, and setting the value of email to true if it's correct, or false if not correct, and then a function checking this.
Code below:
Code:
<script type="text/javascript">
$(document).ready(function(){
var human_check = <?php echo $answer; ?>;
var system_check = {email: false,
name: false,
password: false,
password2: false,
username: false,
human: false};

$(function(check_system) {
var master_switch = true;

for (k in system_check) {
if (!system_check[k]) { master_switch = false; break; }
}

if (system_check['email'] == true) {
$('span#system_good').show();
$('input#gobutton').val('GO, GO, GO');
} else {
$('span#system_good').hide();
$('input#gobutton').val('Please complete the form above!');
}
});

$('input#email').blur(function(){
var email_filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if($('input#email').val().match(email_filter)){
$('span#email_good').show();
$('span#email_odd').hide();
system_check['email'] = true;
} else{
$('span#email_odd').show();
$('span#email_good').hide();
system_check['email'] = false;
}
check_system();
});
snip: a lot of checks like the above.

});
Thank's for any guidance anyone can give me!

Edit: just remembered, i made it only check if email was true or not to work out some debugging, in the actual script, I need to find an eficent way to kill all the birds with one stone (by using the master_switch val initilized, in which, some of that code may not work in jQuery I believe.