-1
Hello, I have a function that allows you to remove and reset options from a <select>
, the "problem" is that when it comes to readjusting the option it goes to the end of select instead of remaining in the original order, I thought of using an array adding the values already in the order I need and somehow verifying the position of the Stack 01 in that array, could someone tell me if that shape I said would be valid or has some other simpler way to do it, and how it could put into practice.
I am currently using this method to add, remembering that this select is created by jquery itself, so some forms do not work:
$('select').append(`<option>Stack 01</option>`)
While this link may answer the question, it is best to include the essential parts of the answer here and provide the link for reference. Replies per link only can be invalidated if the page with the link is changed. - Of Revision
– Kayo Bruno
@Kayobruno I edited (-:
– isaque