View Single Post
Old 12-01-2012, 04:23 PM   PM User | #15
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 860
Thanks: 68
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Ok, I've wrote the code now to do exactly what I want:
Code:
$(function(){
	var index = 0;
	
	$('.prod img').each(function(index) {
		imgDetails[index] = $(this).attr('src');
		alert(index+" "+imgDetails[index]);
		index++;
	});
});
This stores the src values into the array.

I'm thinking now to make it multi-dimensional and add the corresponding text to each of the indexes.

What is the best way to go about doing this?

Should I be doing it at the same time as I put the src's into the array?

Regards,

LC.
__________________
Carewizard - http://www.carewizard.co.uk

Last edited by LearningCoder; 12-01-2012 at 04:25 PM..
LearningCoder is offline   Reply With Quote