forked from germanysbestkeptsecret/Wookmark-jQuery
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
37 lines (33 loc) · 1004 Bytes
/
app.js
File metadata and controls
37 lines (33 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*global requirejs, define, window, document*/
requirejs.config({
"paths": {
"jquery": "../bower_components/jquery/dist/jquery.min",
"imagesLoaded": "../bower_components/imagesloaded/imagesloaded.pkgd.min",
"wookmark": "../wookmark",
"magnificPopup": "../bower_components/magnific-popup/dist/jquery.magnific-popup.min"
},
"shim": {
"magnificPopup": ["jquery"],
"imagesLoaded": ["jquery"]
}
});
// Define the window and document modules so they are available for the Wookmark plugin
define('window', function () {
return window;
});
define('document', function () {
return document;
});
requirejs(['jquery', 'imagesLoaded', 'wookmark', 'magnificPopup'], function ($, imagesLoaded, Wookmark) {
imagesLoaded('#container', function () {
var wookmark = new Wookmark('#container');
// Init lightbox
$('#container').magnificPopup({
delegate: 'li:not(.inactive) a',
type: 'image',
gallery: {
enabled: true
}
});
});
});