I\'m trying to make a very simple Image gallery. Most of the design is already complete (used JQuery)...but now I\'m trying to think out the logic it takes to get the images
Most importantly, you need to build the background property by concatenating ("+" operator) its different parts, as shown below ; otherwise it won't be replaced by the values from your array if you make it a static string.
Also use the global scope to declare and initialize your image array and counter :
Finally, return false from onclick otherwise you'll reload the page :