Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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

#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);