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 _________________ Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 27, 2007, at 1:59 PM, Mario Moura wrote: 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
-- Mário Alberto Chaves Moura [EMAIL PROTECTED] 31-9157-6000