[jQuery] Re: Getting all labels

2007-04-06 Thread Roman Weich
Buzzterrier schrieb: I want to get all labels in a form, and then access their for attribute to link it to the field. I thought that $(label) would give me an array of all label elements that I could loop through and get the for value. But this does not work and I know I am missing something

[jQuery] Re: Getting all labels

2007-04-06 Thread Andy Matthews
Maybe Var myArr = []; $('label').each( myArr.push($(this).attr('for')); ); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Buzzterrier Sent: Friday, April 06, 2007 2:13 PM To: jQuery (English) Subject: [jQuery] Getting all labels I

[jQuery] Re: Getting all labels

2007-04-06 Thread Andy Matthews
PROTECTED] On Behalf Of Andy Matthews Sent: Friday, April 06, 2007 2:27 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Getting all labels Maybe Var myArr = []; $('label').each( myArr.push($(this).attr('for')); ); -Original Message- From: jquery-en@googlegroups.com [mailto