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
Post a Comment