-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvoter-reg-map.html
29 lines (29 loc) · 998 Bytes
/
voter-reg-map.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html>
<head>
<title>Bernie Sanders Campaign Voter Registration Drive Map</title>
<link rel="stylesheet" href="jquery-jvectormap-2.0.4.css" type="text/css" media="screen"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>
<script src="jquery-jvectormap-2.0.4.min.js"></script>
<script src="jquery-jvectormap-us-mill.js"></script>
<script src="voter-reg-links.js"></script>
</head>
<body>
<div id="us-map" style="width: 600px; height: 400px"></div>
<script>
function link_em_to(e, code) {
if (code.substring(3,5) in voter_reg_links) {
window.location.href = voter_reg_links[code.substring(3,5)];
} else {
alert("Sorry, there are no instructions for " + code.substring(3,5));
}
}
$(function(){
$('#us-map').vectorMap({
onRegionClick: link_em_to,
regionStyle: {initial: {stroke: 'green', "stroke-width": 0.3}}
});
});
</script>
</body>
</html>