Dan Switzer wrote:
> 
> Sean,
> 
> The getValue() should do exactly what you need. It returns an array in
> the format [value, label]. So the second element in the array is
> exactly the value I believe you're after.
> 
> -Dan
> 

Dan, thanks. I'm able to get the label using [1], but the behavior is
strange. When I retrieve the value, the correct current value of the
selection is returned immediately. However, when I retrieve the label, it
returns the previous selection's label. This is empty at first selection,
and then incorrect for each subsequent (different) selection.

e.g.
mc = $("#modelFullName").mcDropdown("#modelMenu", {
        modelName = this.getValue();
        updateModelName(modelName[0]);  // this updates immediately & correctly
with the rel attr. of current selection
        // - or -
        updateModelName(modelName[1]);  // this updates with the value of the
previous selection
});


SEAN
-- 
View this message in context: 
http://www.nabble.com/mcDropDown---problem-getting-displayed-value-tp20860269s27240p20897024.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to