Page 1 of 1

HS popup with jvectormap script [solved]

Posted: Tue Oct 16, 2012 10:05 am
by dom222
Sorry for disturbing.
I've simply had to change settings in config:
hs.preserveContent = false;

thnx

____________________________________________________________________________
Hello.

I'm trying to add HS popup to jvectormap script. I want to see HS popup on marker click.

I've added the following lines to jvectormap script:

onMarkerClick: function(event, index){
if (index === '1') {
return hs.htmlExpand(this,{contentId: 'mal'})

}
else if (index === '2') {
return hs.htmlExpand(this,{contentId: 'sey'})
}
}

So the onMarkerClick function returns some index values. I want to show popup#1 when user clicks on the marker with index#1 and popup#1 when user clicks on the marker with index#2.

Right now if user clicks for example on the marker with index#2 after page loading, he gets popup#2. If user will close the popup and click on the marker with index#1 the popup#2 would be opened instead of the popup#1.
If the first click would be on the marker with index#1 then all other markers will show popup#1 on other markers clicking.

How can I return the correct index values and show proper popups for markers?

thnx in advance