I 'm trying to make a save button that saves the new instructions that you have typed in a <textarea>
. When the button is clicked it calls the edit()
function passing the value of the <h1>
and the <textarea>
and the index of the previous recipe to delete it so that there won’t be recipes with the same name. The problem is when there is more than one recipe they shift their names and one recipe gets the instructions of the other. I think maybe there is a problem with the edit()
function but I can’t figure it out. Please help!
Here is a link of the app: https://teo03.github.io/recipe_box/
Here is a the source: https://github.com/Teo03/recipe_box