google chrome - jQuery show function does not work on options in select -
i experience following problem jquery , chrome.
i have couple selects , function called on change of select. works ok, after traverse next select element , filter options. [select > option].
on options going filtered call jquery.hide() , if value ok call jquery.show() show elements.
problem is, when call jquery.show(), see change in page source (developer console) on webpage, select still empty.
i tried selected attribute on option, 1 option being added select , showed, one.
everything works ok in firefox, using chrome 41.x. thnks
not sure code looks like, appears work fine in chrome. https://jsfiddle.net/tdetnn4z/
$("#source").on("change", function(){ sourceval = parseint(this.value); $("#target > option").each(function(){ curr = parseint(this.value); if(curr%sourceval == 0){ $(this).show(); } else{ $(this).hide(); } }) });
Comments
Post a Comment