Dynamically build dropdown list using Jquery opens and closes immediately -


My dynamically-generated dropdown list opens immediately and closes, I have no chance to choose any option Here, the code function looks like what the list creates:

  function MoveItem (itemID) {var selector = "#mov" + itemID; Var replaceValue = "& lt; select class = ddl id =" + + itemID + "& gt;" + $ ("Input: text"). Map (function () {return '& lt; option & gt;' + $ (this) .val () || null;}). (). Meet ("& lt; / option & gt;"); Replace = "& lt; / select & gt;"; $ (Selector) .html (replaceValue); }   

Any ideas why such? Thks people

Tie it to change the event. Such as $ ("#id"). Tie ("Change", Move Itam (this)); I think it will do this. :)

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -