Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- looping through json


daveVk - 1:39 am on Jul 29, 2012 (gmt 0)


To access car thumbnails try

var thumbNo = 1;
var car=cars_data.haveAlook.TheThumbnails;
$(".vehicle_row a").each(function(){
$(this).html('<img src="/comparetherange/images/' +
+ car['thumb'+thumbNo]
+ '" alt="">');
thumbNo++;
});

Note that car.thumb3 and car['thumb3'] are equivalent.

This assumes the links are in same order as thumb numbers ?


Thread source:: http://www.webmasterworld.com/javascript/4479725.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com