Thats fantastic, I had no idea you could do that! You have just made
my day thanks Mike :)
On 20/03/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
> Did you try:
>
> $('div:not(:hidden) .required').each(...
>
> > get all elements that have the class 'required' as long as the
> > container does not have
Did you try:
$('div:not(:hidden) .required').each(...
> get all elements that have the class 'required' as long as the
> container does not have the class 'hidden' but sometimes there are
> loads of nested elements so its not always the parent as such. I've
> tried 'filter' and 'not' but with suc
I have a load of elements in a form hidden until the user activates
it. I am using something like this:
where the first div is hidden.
I also have a required class on each element for validation purposes.
This works like this:
$('.required').each(function(i) {
if ($(this).val() == "") {