Home › Forums › CSS › Problems with trying to get the "text" of a drop down option › Re: Problems with trying to get the “text” of a drop down option
October 17, 2008 at 8:32 am
#50623
pghtech
Member
Ok, so I made the following change and the variable "choice" now returns a value when the drop down selection changes. But the value of variable "choice" still doesn’t meet one of the two conditions ("Me" and "Someone Else"). The other oddity is that when I put in a "alert (choice)" to return the value it got it puts "Me" or "Someone Else" to the far right of the alert window.
My changes
Code:
jQuery(“.choice”).change(function() {
var choice = jQuery(“.choice option:selected”).text();
alert (choice);
var choice = jQuery(“.choice option:selected”).text();
alert (choice);