I have a list of options that looks like this:
<select id="input_13">
<option class="level-1" value="35"> Eielson AFB</option>
<option class="level-1" value="36"> Elmendorf AFB</option>
<option class="level-1" value="37"> Fort Greely</option>
</select>
How can I use .replace to move through each option and take out all the spaces?
So far I’ve tried this, which is not working:
jQuery("#input_13).each(function () {
(this).text().replace(' ','1234');
});
try this:
jsFiddler: http://jsfiddle.net/rwWv7/5/