Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/konapun/jquery.active-thumbnail

jQuery plugin that creates a thumbnail that scrolls with a picture in an overflow container
https://github.com/konapun/jquery.active-thumbnail

Last synced: 22 days ago
JSON representation

jQuery plugin that creates a thumbnail that scrolls with a picture in an overflow container

Awesome Lists containing this project

README

        

# active-thumbnail
Create a thumbnail for a scrolled image that displays the current global location and updates on scroll

## Usage
```html






$(function() {
$('#thumbnail').activeThumbnail();
});

```

The image source to use for the thumbnail is specified either by setting the `data-image` property for the thumbnail,
or in the init options

## Options
* **image**: If the `data-image` HTML property is not specified, this is the id of the image to create a thumbnail view of
* **width**: Width of the thumbnail (default: 100px)
* **height**: Height of the thumbnail (default: 100px)
* **color**: Border color for the current viewable region in the thumbnail (default: red)
* **clickEnabled**: Allow scrolling of the main image through interactions with the thumbnail (default: true)
* **container**: The id of the container element. If not provided, the parent element of the image is used

## Returns
The element representing the selected portion of the thumbnail. This has a method called `upate` which recalculates its size in relation to the image and container, so it can be called when the image zooms