Here's what I'm working on:
http://moresidencesatlanta.com/map/map.html http://moresidencesatlanta.com/map/scripts-map.js
I'm trying to figure out how to set up the .hover function so I don't have to hard code all the names on the right side. Like I have here:
jQuery(".listid1").hover(
function(){
$(".list1").stop(true, true).fadeToggle();
}
);
jQuery(".listid2").hover(
function(){
$(".list2").stop(true, true).fadeToggle();
}
);
The data looks like this:
tooltipsData = [
/* Resturants - Brown */
{"id":"1","x":"72.8","y":"23.2","title":"F&B Atlanta","image":null,"className":"brown","status":"1",
"content":"F&B Atlanta <img src=\"spacer.gif\" width=\"1px\">"},
{"id":"2","x":"44.5","y":"80.6","title":"Antica Posta","image":null,"className":"brown","status":"1",
"content":"Antica Posta <img src=\"spacer.gif\" width=\"1px\">"},
I thought this might work but the variable (id) ends up being the last id (98) in the data list.
jQuery.each('.listid' + [id]).hover(
function(){
$('.list' + [id]).stop(true, true).fadeToggle();
}
);
Any suggestions or solutions that may work here? Thanks!