The click on a button creates a textarea, where you can then either “save” or “cancel”.
This is not just the creation, but in involves some .html()-copying of other elements, replacing elements and so on.
Just by chance I didn’t work on the cancel()-function and only had an empty a href="" on the “Cancel”-link, so when I click it, the page reloads and resets everything.
The page to reload is small and I wonder if I should bother removing the dynamically created element and other stuff involved with jquery or just let the page reload?
The size of the page is irrelevant, the cancel button should not reload the page, so don’t do it. Using
.remove()is trivial anyway 🙂