Git Product home page Git Product logo

mapify's Introduction

Mapify plugin

Responsive and stylable image maps using jQuery, SVG and CSS3

Project website: http://etiennemartin.ca/mapify/

Basic usage

Embed jquery.mapify.css and jquery.mapify.js in your page and call the plugin with the following function:

$("img[usemap]").mapify();

Popovers

$("img[usemap]").mapify({
	popOver: {
  		content: function(zone){ 
  				return "<strong>"+zone.attr("data-title")+"</strong>"+zone.attr("data-nbmembre")+" Members";
  		},
  		delay: 0.7,
  		margin: "15px",
  		height: "130px",
  		width: "260px"
  	}
});

Custom class for a specific popOver

<area data-pop-over-class="custom-popover" href="#" shape="poly" coords="..." />

Hover effects

Custom hover class for all areas

$("img[usemap]").mapify({
	hoverClass: "custom-hover"
});  

Custom hover class for a specific area

<area data-hover-class="custom-hover-2" href="#" shape="poly" coords="..." />

Group multiple areas together

<area data-group-id="group-1" href="#" shape="poly" coords="..." />
<area data-group-id="group-1" href="#" shape="poly" coords="..." />

Stylable with css

.custom-popover{
	background: #09f;
}

.mapify-hover{
	fill:rgba(0,0,0,0.15);
	stroke: #fff;
	stroke-width: 2;
}
	
.custom-hover{
	fill:rgba(0,0,0,0.15);
	stroke: #fff;
	stroke-width: 2;
}

.custom-hover-2{
	fill: #09f;
	stroke: #fff;
	stroke-width: 2;
}

Examples

See http://etiennemartin.ca/mapify/ for live examples.

Built With

  • Grunt - The JavaScript Task Runner
  • jQuery - A fast, small, and feature-rich JavaScript library
  • Sass - Syntactically Awesome Style Sheets

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Update the README.md with details of changes to the plugin.

Update the demo with examples demonstrating the changes to the plugin.

Build the project & test all the features before submitting your pull request.

Authors

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

mapify's People

Contributors

etienne-martin avatar mx0r avatar brockfanning avatar ekonoval avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.