Answer the question
In order to leave comments, you need to log in
Change images on click of a button?
It is necessary to make it so that when the button is clicked, the images in the second block with the picture change. Wrote the code, but it doesn't work at all. I can't figure out what's wrong. I attach the code:
jsfiddle.net/4Lzypuze/2
thanks
Answer the question
In order to leave comments, you need to log in
You were pinched by the closure of the campaign. When the handler is called, the i variable is used internally, which does not exist in the global scope on the
UPD page. Just include jquery. jsfiddle.net/4Lzypuze/3 This is how something comes to life
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question