Sometimes you need to add some informations over the map, as: statistic data (percentage values of voters) or icons, etc. which are dynamically changing. There’s an easy way to do that. Just watch the video tutorial or get the sample code below.
Watch video
Step by step guide of the proper script installation and the sample functions usage.
Get the sample function
The Markup
Before any changes in the script, add numbers (or any other informations you want to display over the map) after links in the list of regions, example:
<li class="pl7"><a href="#mazowieckie">Mazowieckie</a> <b>45 %</b></li>
<li class="pl8"><a href="#opolskie">Opolskie</a> <b>13 %</b></li>
<li class="pl9"><a href="#podkarpackie">Podkarpackie</a> <b>25 %</b></li>
<li class="pl10"><a href="#podlaskie">Podlaskie</a> <b>89 %</b></li>
<li class="pl11"><a href="#pomorskie">Pomorskie</a> <b>55 %</b></li>
If you want to use other HTML tag to wrap you number (the <b />
tag used in this example) you have to change the numberTag = "B"
variable in the script below.