Folks
Thanks a lot, now I can find my element
Mario
2007/4/27, Karl Swedberg <[EMAIL PROTECTED]>:
Hi Mario,
I think what you're looking for is the ":selected" pseudo-class.
Try this:
$('#edit-taxonomy-1 :selected')
To get its value, add .val()
To get its inner text, add .text()
--Karl
_
Hi Mario,
I think what you're looking for is the ":selected" pseudo-class.
Try this:
$('#edit-taxonomy-1 :selected')
To get its value, add .val()
To get its inner text, add .text()
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Apr 27, 2007,
This is a tricky one, you use the contextual selector:
$("option:selected","#edit-taxonomy-1")
This is like saying "find the selected option in the context of element id
edit-taxonomy-1."
Give that a shot.
-- Josh
- Original Message -
From: Mario Moura
To: jquery-en@googleg
Mario Moura wrote:
services
Products
I am trying find the option that have selected="selected" of course is
very random in many inputs.
This should work:
$("#edit-taxonomy-1 [EMAIL PROTECTED]")
You can probably also do
$("#edit-taxonomy-1 [EMAIL PROTECTED]")
Cheers,
-- Scott
4 matches
Mail list logo