Answer the question
In order to leave comments, you need to log in
How to reset all changes after a click function?
There is a code that makes changes to the h1 and img of the modal window.
$( "#example" ).click(function () {
$( "#modal h1" ).html("Заголовок")
$('#modal img').attr('src', '1d/main.png');
...
});
event.preventDefault()
$( "#example" ).unbind( "click" );
Answer the question
In order to leave comments, you need to log in
No way. Write the code yourself.
Cancels browser actions.
unbind removes the click event handler from #example
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question