jquery
function checkname(){
//check name
}
function checkemail(){
//check email
}
function checkgender(){
$("#gender-result").hide();
if (undefined == $("input[name='gender']:checked", "#contact-form").val()) {
$("#gender-result").html('gender requirements.').show();
$('#gender-result').css('color', 'red');
return false;
}
return true;
}
//jquery started
$(document).ready(function () {
$("#username").keyup(checkname);
$("#gender").keyup(checkgender);
$("#email").keyup(checkemail);
$('#contact-form').submit(function(){
checkgender();
checkname();
checkemail();
}
});
i am new to jquery , why is my submit wont active the function inside?? and if is good way to validation like this?
}to})and that should get you closer.