I’m trying to create a new option on the fly and then add it right before the last option of a select.
When I use $("#select").append("<option>hi</option"), it always adds after the last one.
How do I add a new option before the last option of a select?
Online demo: http://jsfiddle.net/6MVEd/