Hi,


I'm using the (excellent) mcDropDown plugin:
http://www.givainc.com/labs/mcdropdown_jquery_plugin.htm
...but can't seem to get the displayed input value, after hours of Googling
& hacking.

Code
-----
$(function () {
   mc = $("#modelName").mcDropdown({
      'select': function(){
         modelName = $('.mcdropdown input').val();
         updateModelName();   // fn that sets text of .modelname spans
      }
   });
});

Text
-----
Your model: <span class='.modelname'>REPLACE ME</span>

What's strange is that the first time a model is selected after page load,
modelName (and .modelname) is set to an empty string. The second time you
select a model, .modelName is replaced... with the text of the previous
model selection. Each successive selection sets the value of the previous
selection(?).

.getValue() doesn't work, and would only return the rel attribute of
selection anyway. What I need is the displayed text.

Ideas? Thanks.


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

Reply via email to