Matt, thanks for your response.

I had originally posted this on jquery-dev group but was referred to
this group.
How do I access the id of the jquery object returned from the next()
function?
I tried Matt's suggestion below but I get an 'undefined' when I alert
state.attr('id').
thank you.

From: Matt Maxwell <leftwithoutli...@gmail.com>
Date: Thu, 3 Dec 2009 05:28:48 -0600
Local: Thurs, Dec 3 2009 3:28 am
Subject: Re: [jquery-dev] Re: next()
Reply | Reply to author | Forward | Print | Individual message | Show
original | Report this message | Find messages by this author

I would do something like

$("select.country").change(function () {
var country = $(this),
country_id = country.attr("id"),
state = country.next("select.state");

});

state isn't the DOM element, it's the jQuery object, so you'd have to
go
alert(state.attr("id"));

Hope this helps.

Also, I agree with Dave, this isn't the place for this kind of
question.

- Hide quoted text -
- Show quoted text -
On Wed, Dec 2, 2009 at 6:20 PM, Dave Methvin <dave.meth...@gmail.com>
wrote:
> The jQuery-en group is a better fit for this question. This group is
> for the discussion of the development of jQuery itself.

> --

Reply via email to