here my code which is not working properly. (it is working if on line 4 I write $("img").attr("src", image_src_1); )
I guess I have to "variablize" line 4.
<script>
var image_src_1 = "image.jpg";
var x = 1;
var new_source_for_image = "image_src_" + x; // I WANT IT TO BE image_src_1
$("img").attr("src", new_source_for_image); // (line 4)
</script>
<body>
<img src="">
</body>