Skip to content

Commit ddafe49

Browse files
committed
Readme updated. Default fade in speed: fast.
1 parent 4e1d3e4 commit ddafe49

File tree

4 files changed

+184
-136
lines changed

4 files changed

+184
-136
lines changed

README.md

+18-19
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ Add jQuery and ABigImage scripts in head of page.
2525

2626
Call plugin on selector of enlargeable images links.
2727

28-
<script>
29-
$(function() {
30-
$('a[href$=".jpg"]').abigimage();
31-
});
32-
</script>
28+
$(function() {
29+
$('a[href$=".jpg"]').abigimage();
30+
});
3331

3432
### Options
3533

@@ -43,6 +41,9 @@ Call plugin on selector of enlargeable images links.
4341
- `onopen` - function called when image opens.
4442
- `*Attrs` - plugin elements attributes.
4543
- `*CSS` - plugin elements CSS.
44+
- `prevBtnHoverCSS` - "previous" button on hover CSS.
45+
- `closeBtnHoverCSS` - "close" button on hover CSS.
46+
- `bottomHoverCSS` - bottom area on hover CSS.
4647

4748
Plugin generates next html code:
4849

@@ -80,21 +81,19 @@ Plugin generates next html code:
8081

8182
Function, defined as `onopen` handler, executes in context of plugin, and receives target element as argument. Plugin elements available in this context as properties.
8283

83-
<script>
84-
$(function() {
85-
$('a[href$=".jpg"]').abigimage({
86-
bottomCSS: {
87-
fontSize: '2em',
88-
textAlign: 'center'
89-
},
90-
onopen: function (target) {
91-
this.bottom.html(
92-
$('img', target).attr('alt')
93-
);
94-
}
95-
});
84+
$(function() {
85+
$('a[href$=".jpg"]').abigimage({
86+
bottomCSS: {
87+
fontSize: '2em',
88+
textAlign: 'center'
89+
},
90+
onopen: function (target) {
91+
this.bottom.html(
92+
$('img', target).attr('alt')
93+
);
94+
}
9695
});
97-
</script>
96+
});
9897

9998
## License
10099

abigimage.jquery.js

+57-57
Original file line numberDiff line numberDiff line change
@@ -154,63 +154,63 @@
154154
};
155155

156156
$.fn.abigimage.defaults = {
157-
fadeIn: 'normal',
158-
fadeOut: 'fast',
159-
160-
prevBtnHtml: '&larr;',
161-
closeBtnHtml: 'x',
162-
163-
keyNext: [13 /* enter */, 32 /* space */, 39 /* right */, 40 /* down */],
164-
keyPrev: [8 /* backspace */, 37 /* left */, 38 /* up */],
165-
keyClose: [27 /* escape */, 35 /* end */, 36 /* home */],
166-
167-
onopen: function() {},
168-
169-
overlayCSS: {position: 'fixed', zIndex: 101, top: 0, right: 0, bottom: 0, left: 0, display: 'none',
170-
backgroundColor: '#000', opacity: 0.9},
171-
layoutCSS: {position: 'fixed', zIndex: 101, top: 0, right: 0, bottom: 0, left: 0, display: 'none',
172-
'-webkit-user-select': 'none', '-moz-user-select': 'none', 'user-select': 'none',
173-
'-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)',
174-
lineHeight: 2.5},
175-
176-
prevBtnWrapperCSS: {cursor: 'pointer', position: 'absolute', top: 0, right: '50%', bottom: 0, left: 0},
177-
closeBtnWrapperCSS: {cursor: 'pointer', position: 'absolute', top: 0, right: 0, bottom: 0, left: '50%'},
178-
179-
prevBtnBoxCSS: {position: 'absolute', zIndex: 104, top: 0, bottom: 0, left: 0},
180-
closeBtnBoxCSS: {position: 'absolute', zIndex: 104, top: 0, bottom: 0, right: 0},
181-
182-
prevBtnCSS: {color: '#fff', backgroundColor: '#000', opacity: 0.5,
183-
padding: '0 1em', borderRadius: '0 0 1ex 0'},
184-
closeBtnCSS: {color: '#fff', backgroundColor: '#000', opacity: 0.5,
185-
padding: '0 1em', borderRadius: '0 0 0 1ex'},
186-
187-
prevBtnHoverCSS: {opacity: 1},
188-
closeBtnHoverCSS: {opacity: 1},
189-
190-
imgCSS: {position: 'absolute', zIndex: 102, margin: 'auto', top: 0, right: 0, bottom: 0, left: 0,
191-
display: 'block', cursor: 'pointer', maxWidth: '100%', maxHeight: '100%'},
192-
193-
imgNextCSS: {position: 'absolute', top: '-10000px', width: '100px'},
194-
imgPrevCSS: {position: 'absolute', top: '-10000px', width: '100px'},
195-
196-
bottomCSS: {position: 'absolute', zIndex: 103, right: 0, bottom: 0, left: 0,
197-
'-webkit-user-select': 'text', '-moz-user-select': 'text', 'user-select': 'text',
198-
backgroundColor: '#000', color: '#fff', opacity: 0.5,
199-
padding: '0 1em', textAlign: 'center'},
200-
bottomHoverCSS: {opacity: 1},
201-
202-
overlayAttrs: {},
203-
layoutAttrs: {},
204-
prevBtnWrapperAttrs: {},
205-
prevBtnBoxAttrs: {},
206-
prevBtnAttrs: {},
207-
closeBtnWrapperAttrs: {},
208-
closeBtnBoxAttrs: {},
209-
closeBtnAttrs: {},
210-
imgAttrs: {},
211-
imgNextAttrs: {},
212-
imgPrevAttrs: {},
213-
bottomAttrs: {}
157+
fadeIn: 'fast',
158+
fadeOut: 'fast',
159+
160+
prevBtnHtml: '&larr;',
161+
closeBtnHtml: 'x',
162+
163+
keyNext: [13 /* enter */, 32 /* space */, 39 /* right */, 40 /* down */],
164+
keyPrev: [8 /* backspace */, 37 /* left */, 38 /* up */],
165+
keyClose: [27 /* escape */, 35 /* end */, 36 /* home */],
166+
167+
onopen: function() {},
168+
169+
overlayCSS: {position: 'fixed', zIndex: 101, top: 0, right: 0, bottom: 0, left: 0, display: 'none',
170+
backgroundColor: '#000', opacity: .9},
171+
layoutCSS: {position: 'fixed', zIndex: 101, top: 0, right: 0, bottom: 0, left: 0, display: 'none',
172+
'-webkit-user-select': 'none', '-moz-user-select': 'none', 'user-select': 'none',
173+
'-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)',
174+
lineHeight: 2.5},
175+
176+
prevBtnWrapperCSS: {cursor: 'pointer', position: 'absolute', top: 0, right: '50%', bottom: 0, left: 0},
177+
closeBtnWrapperCSS: {cursor: 'pointer', position: 'absolute', top: 0, right: 0, bottom: 0, left: '50%'},
178+
179+
prevBtnBoxCSS: {position: 'absolute', zIndex: 104, top: 0, bottom: 0, left: 0},
180+
closeBtnBoxCSS: {position: 'absolute', zIndex: 104, top: 0, bottom: 0, right: 0},
181+
182+
prevBtnCSS: {color: '#fff', backgroundColor: '#000', opacity: .5,
183+
padding: '0 1em', borderRadius: '0 0 1ex 0'},
184+
closeBtnCSS: {color: '#fff', backgroundColor: '#000', opacity: .5,
185+
padding: '0 1em', borderRadius: '0 0 0 1ex'},
186+
187+
prevBtnHoverCSS: {opacity: 1},
188+
closeBtnHoverCSS: {opacity: 1},
189+
190+
imgCSS: {position: 'absolute', zIndex: 102, margin: 'auto', top: 0, right: 0, bottom: 0, left: 0,
191+
display: 'block', cursor: 'pointer', maxWidth: '100%', maxHeight: '100%'},
192+
193+
imgNextCSS: {position: 'absolute', top: '-10000px', width: '100px'},
194+
imgPrevCSS: {position: 'absolute', top: '-10000px', width: '100px'},
195+
196+
bottomCSS: {position: 'absolute', zIndex: 103, right: 0, bottom: 0, left: 0,
197+
'-webkit-user-select': 'text', '-moz-user-select': 'text', 'user-select': 'text',
198+
backgroundColor: '#000', color: '#fff', opacity: .5,
199+
padding: '0 1em', textAlign: 'center'},
200+
bottomHoverCSS: {opacity: 1},
201+
202+
overlayAttrs: {},
203+
layoutAttrs: {},
204+
prevBtnWrapperAttrs: {},
205+
prevBtnBoxAttrs: {},
206+
prevBtnAttrs: {},
207+
closeBtnWrapperAttrs: {},
208+
closeBtnBoxAttrs: {},
209+
closeBtnAttrs: {},
210+
imgAttrs: {},
211+
imgNextAttrs: {},
212+
imgPrevAttrs: {},
213+
bottomAttrs: {}
214214
};
215215

216216
}(jQuery));

abigimage.jquery.json

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "abigimage",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"title": "ABigImage - view big versions of images",
55
"author": {
66
"name": "Maksim Krylosov",
@@ -15,7 +15,26 @@
1515
"jquery": ">=1.9"
1616
},
1717
"description": "Fit mobile devices. Uses link's `href` attribute for large images. Clicking image opens next one, clicking left side opens previous, clicking right side closes image. Hotkeys for next, previous and close buttons. Closing after viewing of all images. Preloading of next and previous images. Fully customizable styles. Customizable bottom area. Customizable `onopen` event.",
18-
"keywords": ["image", "picture", "photo", "view", "viewer", "big", "large", "enlarge"],
18+
"keywords": [
19+
"image",
20+
"picture",
21+
"photo",
22+
"view",
23+
"viewer",
24+
"big",
25+
"large",
26+
"enlarge",
27+
"lightbox",
28+
"popup",
29+
"mobile",
30+
"desktop",
31+
"slideshow",
32+
"keyboard",
33+
"hotkey",
34+
"responsive",
35+
"html5",
36+
"jquery"
37+
],
1938
"homepage": "http://aeqdev.com/tools/js/abigimage/",
2039
"docs": "http://aeqdev.com/tools/js/abigimage/",
2140
"demo": "http://aeqdev.com/tools/js/abigimage/",

0 commit comments

Comments
 (0)