Skip to content

Commit 0048772

Browse files
Add gallery behavior
1 parent ac10913 commit 0048772

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

behaviors/gallery.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
(function ($) {
2+
'use strict';
3+
4+
TXT.behaviors.gallery = {
5+
$el: null,
6+
7+
init: function ($el) {
8+
this.$el = $el;
9+
this.start();
10+
},
11+
12+
start: function () {
13+
this.$el.magnificPopup({
14+
delegate: 'a',
15+
type: 'image',
16+
gallery: {
17+
enabled: true
18+
}
19+
});
20+
}
21+
};
22+
23+
}(jQuery));

0 commit comments

Comments
 (0)