On a HTML page i have an input with a value attribute which is changed by some library i use. After the user changes the value of the input the value property is changed.
After some action i want to remove the user provided value property and let the input show the value provided by the attribute again, and from that point on, do that automatically (like it did before the user ever entered a value).
I looked at some other questions like What is the difference between properties and attributes in HTML? . They all give a descent explanation ofthe difference between property and attribute however nothing to remove the user filled property.
Things i have tried (with jQuery in FF):
$("#my-input").removeProp('value'); // This has no effect
$("#my-input").prop('value', null); // Makes the input empty
$("#my-input").prop('value', false); // Sets value to the string "false"
$("#my-input").prop('value', undefined); // Makes the input empty
$("#my-input").prop('value', $("#my-input").attr('value')); // Sets the correct value however if the external library changes the attribute it doesn't change the prop with it
Edit 1
As requested i made a small minimal snippet showing the question better: https://jsfiddle.net/codx3vmg/
Edit 2
I managed to find a snippet which does exactly what i desire with a form: https://jsfiddle.net/9h6py8oc/
However, in my case i do not have my inputs in a form. Can i reset a specific input (without a form)?