I'm using jQuery to run through all the inputs within a section that I have set from hidden to show, and add required calsses, so as to catch the validation.
$("#" + dependant).find("input[type!='radio']").addClass('required');
Works fine, but I also want to exclude the submits. In normal xPath I would;
input[type!='radio' and type!='submit']
I acheived a work around using .each() and an additional IF;
$("#" + dependant).find("input[type!='radio']").each(function()
{
if ($(this).attr(type) != 'submit')
{
$(this).addClass('required')
}
});
But it strikes me there must be an easier, cleaner way of combining contraints....