Re: [jQuery] Find array key of value

2010-01-12 Thread brian
I'm not sure that I follow that but one thing that might help is to store JSON objects in the array instead of just the src: $( ".images img" ).each( function(i) { imgArray.push( src: $(this).attr( "src" ), key: i ); }); Then, when retrieving the new src you can also get the key/index

[jQuery] Find array key of value

2010-01-12 Thread knal
Hi there, I'm trying to build a custom slideshow (which doesn't loop) but i seem to be unable to iterate through the array of images correctly. Content looks like etc I create an array of images as follows $( ".images img" ).each( function() { imgArray.push( $(this).att