I have my select dropdown initially being created using php like so:
<select id="cupcake-amt" name="amt">
<?php for($i=0; $i<50; $i++) : ?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php endfor; ?>
</select>
How would I create a jquery function that rebuilds the options to a different amount. So instead of 50 options I would want it 12 later. What’s the best approach?
If you want to rebuild your options upt 12 items in jQuery, you can do like this
Working sample : http://jsfiddle.net/yDh6x/3/