I want to focus the info window on mouse hover on marker. And window will be open as long as he stay on info window. Below is my code
content="<div class='info_content' id='info"+obj.customer_id+"'><span>"+j+".</span><h1><a href='<?php echo Mage::getUrl() ?>"+obj.identifier+"<?php echo $suffix; ?>'>"+obj.company.substr(0, 28)+"</a> </h1><br /><p>"+address+"</p><p>"+Math.round(obj.distance)+" Km Away</p><br /><button type='button' value='Get Direction' class='button_input' onclick='closeInfoWindow(),calcRoute("+obj.latitude+","+obj.longitude+")' name='Get Direction'>Get Direction</button></div>";
marker = new google.maps.Marker({
position: position,
map: map,
title: obj.company,
icon:icon,
});
if(i==0)
{
map.setCenter(marker.getPosition())
}
google.maps.event.addListener(marker,'mouseover', (function(marker,content,infowindow){
return function() {
infowindow.close();
infowindow.setContent(content);
infowindow.open(map,marker);
jQuery("#info"+obj.customer_id).focus();
};
})(marker,content,infowindow));
google.maps.event.addListener(marker,'mouseout', (function(marker,content,infowindow){
return function() {
};
})(marker,content,infowindow));