Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

image-tags

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-tags

A jQuery plugin that you can adds tags to your image.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

image-tags

A configurable jQuery plugin that allows you to tag images and so on.

Installation

Using npm:

npm install image-tags

Manually: Simply download jquey.tags.js from this repo and add it to your HTML. e.g.

Then include it after your jQuery file.

<script src="js/jquery.js"></script>
<script src="./js/jquery.tags.js"></script>

Optionally you can use include the css file as well.

<link href="css/tags.css" />

2. Configuration

var options = {

	// Aligning the text
	align: {
		x: 'center', // left, center or right
		y: 'center'	// top,	center or bottom
	},


	// The (relative) offset of the popups in pixels
	offset: {
		left: -15, // horizontal offset
		top: 20	// vertical offset
	},


	// event handlers of the tags
	handlers: {
		click: function(e) {
			alert('You clicked a button');
			this; // the DOM Node
			e;	// the Event
		},
		// Use 'show', 'hide' and 'toggle' to show/hide popups on mouse actions.
		mouseenter: 'show', # Displays popup on mouseenter.
		mouseleave: 'hide'  # Hides popup on mouseleave.
	}

	// Whether to enable editor mode
	edit: false,
	
	// vote mode 
	//first edit:false must be false
	//then 
	tagsType: 'radio', 
    radioBaseSize: 24,
	// Strings for buttons
	strings: {
		save: '&#x2713;',
		delete: '&#x00D7;'
		addLink: '&#64;'
	}
};


// The magic comes together here
$('.taggd').taggd( options, data );

3. What is “data” and how do I get it?

Data are the tags. Taggd accepts different formats, so pay close attention!

var data = [
	// x and y values can be decimals (0-1)
	{
		x: 0.5,
		y: 0.33,
		text: 'test',
		attributes: {
			id:    'my-id',
			class: 'my-class'
		}
	},
	
	//vote mode
	{
		x: 0.5,
		y: 0.33,
		percent:0.6
		text: 'iphone',
	},
	{
		x: 0.15,
		y: 0.8,
		percent:0.4
		text: 'android',
	},
	
	//link
	
	{
		x: 0.15,
		y: 0.8,
		link: 'http://gold.xitu.io/#/'
	},
];	

Keywords

FAQs

Package last updated on 05 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc