My issue is simple, and I have an idea of why it might not work but I could use some advice or alternative options.
Essentially, what I am trying to achieve is having the same button be responsive for the save, and once saved is clicked and processed correctly, then I want the id to change to next and perform an on-click event once the button is clicked again with the new id. The id change part below is in a functioning if statement so that is not the issue, I left it out so it was more readable.
document.getElementById("save").id = "next";
I tried showing and hiding two separate buttons, but I would like the buttons to be in the exact same place.
document.getElementById("save").id = "next";
$('#next').on('click', function () {
// My code here
}