I would like to create a dropdown list where the last option will be to enter a new value.
How could I create this ?
Is there any jQuery plugin that provides such thing ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no Html element that can do what you are looking for natively.
However as a workaround, you can bind a change event handler to your dropdown list. The rest depends on how exactly you would like the user to enter the new value:
Note that some browsers raise an onchange event when the listbox is changed, others only when it’s change and loses focus. So you might also want to listen to mousedown and keydown events if you want your UI to provide a consistent behavior.