Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 lars 1
(function($, window, document, undefined) {
2
    'use strict';
3
 
4
    // init cubeportfolio
5
    $('#js-grid-juicy-projects').cubeportfolio({
6
        filters: '#js-filters-juicy-projects',
7
        loadMore: '#js-loadMore-juicy-projects',
8
        loadMoreAction: 'click',
9
        layoutMode: 'grid',
10
        defaultFilter: '*',
11
        animationType: 'quicksand',
12
        gapHorizontal: 35,
13
        gapVertical: 30,
14
        gridAdjustment: 'responsive',
15
        mediaQueries: [{
16
            width: 1500,
17
            cols: 5
18
        }, {
19
            width: 1100,
20
            cols: 4
21
        }, {
22
            width: 800,
23
            cols: 3
24
        }, {
25
            width: 480,
26
            cols: 2
27
        }, {
28
            width: 320,
29
            cols: 1
30
        }],
31
        caption: 'overlayBottomReveal',
32
        displayType: 'sequentially',
33
        displayTypeSpeed: 80,
34
 
35
        // lightbox
36
        lightboxDelegate: '.cbp-lightbox',
37
        lightboxGallery: true,
38
        lightboxTitleSrc: 'data-title',
39
        lightboxCounter: '<div class="cbp-popup-lightbox-counter">{{current}} of {{total}}</div>',
40
 
41
        // singlePage popup
42
        singlePageDelegate: '.cbp-singlePage',
43
        singlePageDeeplinking: true,
44
        singlePageStickyNavigation: true,
45
        singlePageCounter: '<div class="cbp-popup-singlePage-counter">{{current}} of {{total}}</div>',
46
        singlePageCallback: function(url, element) {
47
            // to update singlePage content use the following method: this.updateSinglePage(yourContent)
48
            var t = this;
49
 
50
            $.ajax({
51
                    url: url,
52
                    type: 'GET',
53
                    dataType: 'html',
54
                    timeout: 10000
55
                })
56
                .done(function(result) {
57
                    t.updateSinglePage(result);
58
                })
59
                .fail(function() {
60
                    t.updateSinglePage('AJAX Error! Please refresh the page!');
61
                });
62
        },
63
    });
64
 
65
})(jQuery, window, document);