I have this dropdown list, but the options are not set in the correct order. Is there a way to sort them (based on their value i guess) using javascript?
<select class="required" name="payment_gateway">
<option value="bank-transfer">Bank</option>
<option value="pay-social">Social</option>
<option value="paypal">PayPal</option>
<option value="pronamic_ideal">iDEAL</option>
</select>
The desired sorting would be:
<select class="required" name="payment_gateway">
<option value="pay-social">Social</option>
<option value="pronamic_ideal">iDEAL</option>
<option value="bank-transfer">Bank</option>
<option value="paypal">PayPal</option>
</select>