Answer the question
In order to leave comments, you need to log in
Jquery modal image works fine only the first time, how to solve?
Hello, friends. I created a modal image that when changing the image works fine only the first time, and then, when we close the modal window and open it again, the image change does not work correctly. Please help solve this problem. Here is the link https://jsfiddle.net/no4w2a71
Answer the question
In order to leave comments, you need to log in
With each click on the images, you add click handlers to the buttons. As a result, how many times the window is opened - so many button handlers will hang. And when clicked, all of them will be executed, and each one will make +/- 1 to the current index.
Take out and beyond . $('#m_prev').click
$('#m_next').click
$('.norutyun img').click
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question