I have a google map with numbered pins. The pins are red colored in the map. The actual addresses in the page should have greyed out markers. I am trying to use the background property to the address element "LocationName" which holds the address to attach the grey marker image background (no repeat left center). images are named greymarker1, greymarker2 etc.. so if it is the first address, greymarker1.png should be the icon infront of the address ONE. I can set the background css property using jquery but i am not sure how to make the URL dynamic.. '/Style Library/Images/design/icons/greymarker1.png') the 1 in the url should change with the counter..when counter is equals 1, it should grab greymarker1.png etc..
$('.LocationName').each(function(index){
var counter=index+1;
//$(this).css('color', 'blue');
$(this).css("background-image", "url('/Style Library/Images/design/icons/greymarker1.png')");
});