Skip to content
Responsive Image Maps jQuery Plugin
JavaScript
Branch: master
Clone or download

Latest commit

stowball Merge pull request #107 from pvnr0082t/pvnr0082t-patch-1
add CDNJS version badge in README.md
Latest commit afc88d0 Oct 18, 2016

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Added support for jQuery 3. Dropped <1.7. Fixes #103 Sep 16, 2016
README.md add CDNJS version badge in README.md Oct 18, 2016
jquery.rwdImageMaps.js Added support for jQuery 3. Dropped <1.7. Fixes #103 Sep 16, 2016
jquery.rwdImageMaps.min.js Added support for jQuery 3. Dropped <1.7. Fixes #103 Sep 16, 2016

README.md

jQuery RWD Image Maps

CDNJS

Allows image maps to be used in a responsive design by recalculating the area coordinates to match the actual image size on load and window.resize


Usage:

  • If possible, add correct, unitless width and height attributes to your image map images. You can override these in CSS to make them responsive.
  • Add a link to jQuery in your page, preferably at the bottom just before the closing </body>
  • After jQuery, either in a <script> block or a separate file, call:
$('img[usemap]').rwdImageMaps();

You may also want to wrap it inside a $(document).ready() function, like so:

$(document).ready(function(e) {
    $('img[usemap]').rwdImageMaps();
});

Demo:

http://mattstow.com/experiment/responsive-image-maps/rwd-image-maps.html


Copyright (c) 2016 Matt Stow
Licensed under the MIT license (see LICENSE for details)
Minified version created with Online YUI Compressor: http://www.refresh-sf.com/yui/

You can’t perform that action at this time.