This time I will share jQuery Plugin and tutorial about jQuery Plugin For Justified Image Gallery – Justified-Gallery, hope it will help you in programming stack.
File Size:
3.94 MB
Views Total:
23662
Last Update:
11 months ago
Publish Date:
8 years ago
Official Website:
Go to website
License:
MIT
Justified-Gallery is a simple and fast jQuery plugin that automatically adjust the width and height of your images to create a justified image gallery on your web site.
Features:
Lightbox effect supported (Colorbox Plugin needed)
caption over image supported
Basic Usage:
1. Load jQuery library and jquery.justifiedgallery.min.js on your page
1
<
script
src
=
"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
></
script
>
2
<
script
type
=
'text/javascript'
src
=
'../js/jquery.justifiedgallery.min.js'
></
script
>
2. The CSS
08
.justifiedGallery .jg-image {
10
display
: inline-
block
;
14
.justifiedGallery .jg-image img {
18
.justifiedGallery .jg-image a {
21
.justifiedGallery .jg-image-label {
23
font
:
normal
12px
arial
;
29
padding
:
5px
5px
10px
8px
;
32
filter: alpha(opacity=
0
)
34
.justifiedGallery .jg-loading-img {
38
background
:
url
(../img/loading.gif)
no-repeat
center
center
40
.justifiedGallery .jg-loading {
44
background-color
:
white
;
45
-webkit-border-radius:
3px
;
46
-moz-border-radius:
3px
;
49
.justifiedGallery .jg-row {
3. The Html
02
<
a
href
=
"photos/8083451788_552becfbc7_b.jpg"
title
=
"What's your destination?"
>
03
<
img
alt
=
"What's your destination?"
src
=
"photos/8083451788_552becfbc7_m.jpg"
/>
05
<
a
href
=
"photos/7948632554_01f6ae6b6f_b.jpg"
title
=
"Just in a dream Place"
>
06
<
img
alt
=
"Just in a dream Place"
src
=
"photos/7948632554_01f6ae6b6f_m.jpg"
/>
08
<
a
href
=
"photos/7893834940_8fcbb47c14_b.jpg"
title
=
"Il Capo at Palermo"
>
09
<
img
alt
=
"Il Capo at Palermo"
src
=
"photos/7893834940_8fcbb47c14_m.jpg"
/>
11
<
a
href
=
"photos/7822678460_ee98ff1f69_b.jpg"
title
=
"Erice"
>
12
<
img
alt
=
"Erice"
src
=
"photos/7822678460_ee98ff1f69_m.jpg"
/>
14
<
a
href
=
"photos/7302459122_19fa1d8223_b.jpg"
title
=
"Truthful Innocence"
>
15
<
img
alt
=
"Truthful Innocence"
src
=
"photos/7302459122_19fa1d8223_m.jpg"
/>
4. The javascript
01
<script type=
"text/javascript"
>
02
$(
"#demo"
).justifiedGallery({