项目作者: stowball

项目描述 :
Responsive Image Maps jQuery Plugin
高级语言: JavaScript
项目地址: git://github.com/stowball/jQuery-rwdImageMaps.git
创建时间: 2012-04-15T05:55:49Z
项目社区:https://github.com/stowball/jQuery-rwdImageMaps

开源协议:MIT License

下载


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:
  1. $('img[usemap]').rwdImageMaps();

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

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

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/