I got 2 forms in 2 different div's which are hidden, if the user clicks on one (login, register) the relevant div is shown.
I've named the form fields like reg_username, reg_email ... and the login fields are named login_username login_password.
Now i've created a function which validate the fields. When i step through with this part of code
$("#account").find(':input').each(function(i) {
});
it finds every form field.
the div #account is my main div where all fields are in from the 2 div #register and #login. There are serval other input fields in those 2 div's.
Depending on the div i only want to check fields starting with a tag (reg or login), is there a way to get only this div's and not all?