On 12/18/06, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Andy Matthews schrieb:
> > I'm using some code that Mike Alsup provided a few months ago. I need to get
> > the text of an option tag in addition to it's value. He suggested the
> > following:
> >
> > $('#unit [EMAIL PROTECTED]').text();
> >
> > Which works perfectly in IE, but not at all in Firefox. When this code is
> > run on this page, Firefox returns a blank result (when alerted). Anyone have
> > any ideas, or have alternate code? I'm using the most recent version of
> > jQuery (downloaded on Saturday).
> >
> For the lazy-likes-to-help folk: Could you provide a simple demo page?

That is me! A demo page I can use Firebug on is always extremely helpful. :)

I'm unfamiliar with the previous post where Mike suggested using the
@selected selector but have you tried using the :selected selector?

$('#unit option:selected').text();

--
Brandon Aaron

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to