I am updating the width of the select element using .css when the onchange event occurs. In HTML:
<select name="city_search" id="city_search" onchange='resetDropDown("#state_search");'> <select name="state_search" id="state_search" onchange='resetDropDown("#city_search");'>
In js
function resetDropDown(elementObj) { var selectBoxWidth = $(elementObj).attr('id') == 'college_search' ? 143 : 113; $(elementObj).css({width:selectBoxWidth}); }
For some reason, the width of the attribute is correctly changed, but chrome does not display the changes until the element is checked or the page is refreshed. Is there a way to make chrome show the changes applied to the style of the element?
Thanks in advance. Elizabeth
source share