I am opening up both a registration form and a login form in a modal window using Colorbox
Unfortunately, the jQuery validate plug in doesn't work anymore. I did a search and found someone a question with the answer I needed here at Stack Overflow. I'm not really well versed with JavaScript yet so I had a bit of a problem implementing the solution.
I tried interpreting the solutions on my code but couldn't figure it out. My code is as follows:
$(document).ready(function(){
$('.popup').colorbox();
$('#register form').validate({
rules: {
username: {
required: true,
},
email: {
required: true,
email: true
},
password: {
minlength: 4,
required: true
},
password2: {
equalTo: "#password"
}
},
success: function(label) {
label.text('OK!').addClass('valid');
}
});
$('#login form').validate({
rules: {
username: {
required: true
},
password: {
required: true
}
}
})
; });
Can somebody please clarify how I can implement the solution a bit? Thank you.