Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeka-kiselyov/jquery-imgrights

A simple jQuery plugin for displaying image copyrights tooltip on IMG tag after mouseover event. Can get copyright data from both data-* attributes and hmedia microformat definition.
https://github.com/jeka-kiselyov/jquery-imgrights

Last synced: about 1 month ago
JSON representation

A simple jQuery plugin for displaying image copyrights tooltip on IMG tag after mouseover event. Can get copyright data from both data-* attributes and hmedia microformat definition.

Awesome Lists containing this project

README

        

# jQuery IMGRights Plugin

A simple jQuery plugin for displaying image copyrights tooltip on IMG tag after
mouseover event. Can get copyright data from both data-* attributes and hmedia
microformat definition. Demo - http://jeka-kiselyov.github.com/jquery-imgrights/

## Installation

Include script after the jQuery:



## Initialization

Common method is to apply imgrights to all supported elements on the page:
```javascript
$(function(){
$('img, .hmedia').imgrights();
});
```

Custom copyright string format:
```javascript
$(function(){
$('img, .hmedia').imgrights({format: "© %copyright%"});
});
```

## Copyright data

### data-*

Copyright information can be stored in IMG tag attributes.
```html

```
Will generate tooltip with copyright owner name ZOOM-ZOOM studio, linked to http://vk.com/club30994140.

### hmedia microformat

- .hmedia > img.photo - image element
- .hmedia > .contributor > .fn - author name
- .hmedia > .contributor > .url - author URL (href attr)

hmedia classic example
```html



Saturday Nights alright for fighting, by treeswing

Saturday Night's Alright For Fighting,
by
Treeswing
(profile)


```
Will generate tooltip with copyright owner name Treeswing, linked to treeswing.net.

## Authors

[Jeka Kiselyov](https://github.com/jeka-kiselyov)