Skip to content

Commit 57d728d

Browse files
committed
.
1 parent 050fa49 commit 57d728d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frames.js for 23 Video
2-
A jQuery plugin for creating dynamic thumbnails on a 23 Video website.
2+
A jQuery plugin for creating dynamic thumbnails on a <a href="http://23video.com">23 Video</a> website.
33

44
## What is frames.js?
55
frames.js is a simple jQuery plugin that makes the thumbnails on your 23 Video website cycle through a number of keyframes from the corresponding video when hovered over. Either as a timed cycle (much like thumbnails on Dailymotion) or corresponding to mouse movement from left to right over the image (like photo albums in Apple iPhoto). Use it as a handy preview feature, or just as a cool design element.
@@ -33,7 +33,7 @@ Then add the `data-length` attribute and parse the liquid variable `photo.video_
3333
<img src="{{photo.thumbnail_url}}" width="{{photo.thumbnail_width}}" height="{{photo.thumbnail_height}}" data-length="{{photo.video_length}}" />
3434

3535
### Activate frames.js
36-
You active frames.js by calling the `frames()` function on a jQuery collection of thumbnail images:
36+
You activate frames.js by calling the `frames()` function on a jQuery collection of thumbnail images:
3737

3838
jQuery(".view-item img").frames();
3939

@@ -50,8 +50,9 @@ frames.js comes with a set of options that allows you to customize the behaviour
5050
* `interval`: The time in milliseconds that each frame should be shown before moving on to the next in `cycle`mode. *Default: 1500*.
5151

5252
#### Skim mode specific
53-
* `showProgress`: Value indication if a progress bar should be shown on top of the thumbnail *Default: true*.
54-
* `progressVerticalAlign`: Place of the progress bar. Options are `"top"`and `"bottom"`. *Default: "top"*.
53+
* `showProgress`: Boolean value indicating if a progress bar should be shown on top of the thumbnail *Default: true*.
54+
* `progressHeight`: Height of the progress bar in pixels or percent. *Default: "5%"*
55+
* `progressAlign`: Place of the progress bar. Options are `"top"`and `"bottom"`. *Default: "top"*.
5556
* `progressColor`: Color of the progress bar. *Default: "#49A34D"*.
5657

5758

frames.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
mode: "skim",
1919
showProgress: true,
2020
progressColor: "#49A34D",
21-
progressVerticalAlign: "top"
21+
progressAlign: "top",
22+
progressHeight: "5%"
2223
}, options);
2324

2425
var intervals = [];
@@ -131,11 +132,11 @@
131132
progressBar.css({
132133
position: "absolute",
133134
left: 0,
134-
height: "5%",
135+
height: settings.progressHeight,
135136
width: "0%",
136137
backgroundColor: settings.progressColor
137138
});
138-
if (settings.progressVerticalAlign === "bottom") {
139+
if (settings.progressAlign === "bottom") {
139140
progressBar.css({top: ($that.height() - progressBar.height())});
140141
} else {
141142
progressBar.css({top: 0});
@@ -149,7 +150,7 @@
149150
$(that.hoverElement).mousemove(function(e){
150151
framesLength = loadedFrames.length;
151152

152-
// If framesLength's empty - no images loaded yet - use frameCount to show progress "correctly"
153+
// If framesLength's zero - no images loaded yet - use frameCount to show progress "correctly"
153154
if (framesLength === 0) {framesLength = settings.frameCount;}
154155

155156
// Get mouse x-value relative to img and translate to corresponding frame

0 commit comments

Comments
 (0)