Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 lars 1
var UIGeneral = function () {
2
 
3
    var handlePulsate = function () {
4
        if (!jQuery().pulsate) {
5
            return;
6
        }
7
 
8
        if (App.isIE8() == true) {
9
            return; // pulsate plugin does not support IE8 and below
10
        }
11
 
12
        if (jQuery().pulsate) {
13
            jQuery('#pulsate-regular').pulsate({
14
                color: "#bf1c56"
15
            });
16
 
17
            jQuery('#pulsate-once').click(function () {
18
                $('#pulsate-once-target').pulsate({
19
                    color: "#399bc3",
20
                    repeat: false
21
                });
22
            });
23
 
24
            jQuery('#pulsate-crazy').click(function () {
25
                $('#pulsate-crazy-target').pulsate({
26
                    color: "#fdbe41",
27
                    reach: 50,
28
                    repeat: 10,
29
                    speed: 100,
30
                    glow: true
31
                });
32
            });
33
        }
34
    }
35
 
36
    var handleDynamicPagination = function() {
37
        $('#dynamic_pager_demo1').bootpag({
38
            paginationClass: 'pagination',
39
            next: '<i class="fa fa-angle-right"></i>',
40
            prev: '<i class="fa fa-angle-left"></i>',
41
            total: 6,
42
            page: 1,
43
        }).on("page", function(event, num){
44
            $("#dynamic_pager_content1").html("Page " + num + " content here"); // or some ajax content loading...
45
        });
46
 
47
        $('#dynamic_pager_demo2').bootpag({
48
            paginationClass: 'pagination pagination-sm',
49
            next: '<i class="fa fa-angle-right"></i>',
50
            prev: '<i class="fa fa-angle-left"></i>',
51
            total: 24,
52
            page: 1,
53
            maxVisible: 6
54
        }).on('page', function(event, num){
55
            $("#dynamic_pager_content2").html("Page " + num + " content here"); // or some ajax content loading...
56
        });
57
    }
58
 
59
    return {
60
        //main function to initiate the module
61
        init: function () {
62
            handlePulsate();
63
            handleDynamicPagination();
64
        }
65
 
66
    };
67
 
68
}();
69
 
70
jQuery(document).ready(function() {
71
   UIGeneral.init();
72
});