jquery - Refresh selected option -


i have select tag, jquery works fine except @ loading. @ loading option should hidden visible. if click on select option won't available because 1 hidden (then if select else becomes hidden) not @ loading, why? edit: checked, every option visibility hidden @ beginning, have no idea why

i have work fine after loading: function nextvisibleoption() {

function nextvisibleoption() {     $j("#list_departement option").each(function() {          if($j(this).is("option:visible")) {             $j("#list_departement").val($j(this).val());             return false;         }         return;     }); } 

and called @ beginning of script when page load:

$j("#liste_pays_selected img").each(function() {     var id_pays = $j(this).data("id_pays");     $j("#lst_pays option[value=" + id_pays + "]").hide();  }); nextvisibleoption(); 

strangely every option considered not visible because script not entering inside if of function nextvisibleoption..


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -