How to create a loop for the following code? – Jquery
I wrote the following code: $("#img1").add("#label1").fadeIn(); $("#img1").click(function() { $(this).attr("src", "/abc/xyz.png"); $("#content1").add("#img2").add("#label2").fadeIn(1000); }); When I click on img2, the image source ishould change and content2 as well as img3 / label3 should be displayed.When I reach img5, just content5 should be…