I'd like to get the value of an array depending on the index of the ul element. I'll try to explain myself:
var descgal0 = ["3456", "463", "6557", "5242"];
var descgal1 = ["gfdgfd" "gfgdfg", "gfdg", "gfdg"];
$("#gal-content-all section ul li img").click(function() {
var index = $(this).parent().index();
var indexul = $(this).parent().parent().parent().index();
});
The problem is
$("#gal-zoom h4").text(descgal0[index]); //WORKS!
$("#gal-zoom h4").text("descgal"+indexul+[index]); //DOESN'T WORK :(
How could I get the array[li] value depending the ul I'm clicking on...?? Thank you!!!!