ui-general.js
2.04 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
66
67
68
69
70
71
72
var UIGeneral = function () {
var handlePulsate = function () {
if (!jQuery().pulsate) {
return;
}
if (App.isIE8() == true) {
return; // pulsate plugin does not support IE8 and below
}
if (jQuery().pulsate) {
jQuery('#pulsate-regular').pulsate({
color: "#bf1c56"
});
jQuery('#pulsate-once').click(function () {
$('#pulsate-once-target').pulsate({
color: "#399bc3",
repeat: false
});
});
jQuery('#pulsate-crazy').click(function () {
$('#pulsate-crazy-target').pulsate({
color: "#fdbe41",
reach: 50,
repeat: 10,
speed: 100,
glow: true
});
});
}
}
var handleDynamicPagination = function() {
$('#dynamic_pager_demo1').bootpag({
paginationClass: 'pagination',
next: '<i class="fa fa-angle-right"></i>',
prev: '<i class="fa fa-angle-left"></i>',
total: 6,
page: 1,
}).on("page", function(event, num){
$("#dynamic_pager_content1").html("Page " + num + " content here"); // or some ajax content loading...
});
$('#dynamic_pager_demo2').bootpag({
paginationClass: 'pagination pagination-sm',
next: '<i class="fa fa-angle-right"></i>',
prev: '<i class="fa fa-angle-left"></i>',
total: 24,
page: 1,
maxVisible: 6
}).on('page', function(event, num){
$("#dynamic_pager_content2").html("Page " + num + " content here"); // or some ajax content loading...
});
}
return {
//main function to initiate the module
init: function () {
handlePulsate();
handleDynamicPagination();
}
};
}();
jQuery(document).ready(function() {
UIGeneral.init();
});