portfolio-3.js
1.94 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(function($, window, document, undefined) {
'use strict';
// init cubeportfolio
$('#js-grid-lightbox-gallery').cubeportfolio({
filters: '#js-filters-lightbox-gallery1, #js-filters-lightbox-gallery2',
loadMore: '#js-loadMore-lightbox-gallery',
loadMoreAction: 'click',
layoutMode: 'grid',
mediaQueries: [{
width: 1500,
cols: 5
}, {
width: 1100,
cols: 4
}, {
width: 800,
cols: 3
}, {
width: 480,
cols: 2
}, {
width: 320,
cols: 1
}],
defaultFilter: '*',
animationType: 'rotateSides',
gapHorizontal: 10,
gapVertical: 10,
gridAdjustment: 'responsive',
caption: 'zoom',
displayType: 'sequentially',
displayTypeSpeed: 100,
// lightbox
lightboxDelegate: '.cbp-lightbox',
lightboxGallery: true,
lightboxTitleSrc: 'data-title',
lightboxCounter: '<div class="cbp-popup-lightbox-counter">{{current}} of {{total}}</div>',
// singlePageInline
singlePageInlineDelegate: '.cbp-singlePageInline',
singlePageInlinePosition: 'below',
singlePageInlineInFocus: true,
singlePageInlineCallback: function(url, element) {
// to update singlePageInline content use the following method: this.updateSinglePageInline(yourContent)
var t = this;
$.ajax({
url: url,
type: 'GET',
dataType: 'html',
timeout: 10000
})
.done(function(result) {
t.updateSinglePageInline(result);
})
.fail(function() {
t.updateSinglePageInline('AJAX Error! Please refresh the page!');
});
},
});
})(jQuery, window, document);