I've been using imagemapster.js from http://www.outsharked.com/imagemapster/ for hover effects on the State Maps. It'll resize any image map you use automatically, so there's no need for another script. You have to be sure not to set an inline width or height in the <img>
or it'll screw up in IE7-8.
-
-
Save jimmynotjim/78d46e99cac8746e862c to your computer and use it in GitHub Desktop.
JS for responsive State Maps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="<?php bloginfo( 'template_url' ); ?>/assets/js/jquery.imagemapster.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
$('#usa_image').mapster({ | |
fillOpacity: 0.7, | |
render_highlight: { | |
fillColor: '424384', | |
stroke: true, | |
strokeColor: 'ffffff' | |
}, | |
render_select: { | |
fillColor: '424384', | |
stroke: false | |
}, | |
fadeInterval: 50 | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment