javascript - Remove attribute multiple from chosen -


i have 2 select: method , list, when method value 1,list have multiple choice when method value 2, don't have multiple choices,

this de code:

$method.chosen().change(function() {     if($method.val() == '1')     {         $list.attr('multiple');     }     else     {         $list.removeattr('multiple');     } $list.trigger("liszt:updated"); }); 

and didn't work remove attribute multiple, when don't use chosen plugins works, thanks!

using $list.attr('multiple'); return value of attribute multiple.

what want set value, try :

$list.attr('multiple', true); 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -