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@googlegroups.com 
  Sent: Friday, April 27, 2007 10:59 AM
  Subject: [jQuery] Find a element - Basic issue


  Hi Folks
  My DOM is something like this

  <select id="edit-taxonomy-1" class="form-select" name="taxonomy[1]">
  <option value="0"><none></option>
  <option selected="selected" value="1820">services</option>
  <option value="1839">Products</option>

  I am trying find the option that have selected="selected" of course is very 
random in many inputs. 
  I tried a lot of things but nothing works.

  $($("#edit-taxonomy-1").children().get()).contains("selected")
  $($("#edit-taxonomy-1").children().get()).find("selected")
  I tried very basic like
  $().find("selected") but dont work and many others.

  What is missing?

  I will appreciate a tip. Help me!

  Regards

  macm

Reply via email to