I have a button:
<div id="save-submit" class="save-submit">
Submit Code
</div>
When its clicked it checks for an input, if the input is correct i rename the button to continue:
$('.save-submit').click(function(e){
var button = document.getElementById("save-submit");
button.className="next-task";
button.innerHTML="Continue";
button.id="next-task-id";
});
When the continue button is pressed it should load new tasks, but its going back to the save-submit aka trying to rename the button.
$('.next-task').on('click', function (e) {
e.preventDefault();
GetTask();
});
What am i doing wrong?
Thanks!