animations.init.js
4.01 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
(function($)
{
// animate only after page finished loading
$(window).on('load', function()
{
winonloadfun();
});
})(jQuery);
function winonloadfun()
{
// restore visibility
$(".layout-app, #menu-top, .navbar.main").css('visibility', 'visible').show();//, #footer #menu,
// disable animations on touch devices
if (Modernizr.touch)
return;
// // disable animations if browser doesn't support css transitions & 3d transforms
if (!$('html.csstransitions.csstransforms3d').length)return;
if(kstychAppObject['config']['appanimate']==1)
{
// animate sidebar
//$("#menu").addClass('animated fadeInLeft');
// animate main navbar & footer
$(".navbar.main, #footer").not('.kstych_init').addClass('kstych_init').addClass('animated fadeInUp');
// animate top menu
$("#menu-top").not('.kstych_init').addClass('kstych_init').addClass('animated fadeInDown');
// animate layout columns
$(".layout-app .col-app, .row-app > [class*='col-']").not('.col-unscrollable').not('.kstych_init').addClass('kstych_init').addClass('animated fadeInDown');
// animate dashboard friend list
$(".friends-list > li")
.not('.kstych_init').addClass('kstych_init')
.css('visibility', 'hidden')
.each(function(k,v)
{
var t = $(this);
setTimeout(function(){
t.css('visibility', 'visible').addClass('animated fadeInUp');
}, 150*k);
});
// animate dashboard friend list
$(".list-group > .list-group-item")
.not('.kstych_init').addClass('kstych_init')
.css('visibility', 'hidden')
.each(function(k,v)
{
var t = $(this);
setTimeout(function(){
t.css('visibility', 'visible').addClass('animated fadeInUp');
}, 150*k);
});
// animate timelines
$(".timeline-activity > li")
.not('.kstych_init').addClass('kstych_init')
.css('visibility', 'hidden')
.each(function(k,v)
{
var t = $(this),
b = 100,
r = (t.parent().height() / t.parent().find('> li').length) / b,
r = (Math.round(r) * b) - b,
r = r < 200 ? 200 : r;
setTimeout(function(){
t.css('visibility', 'visible').addClass('animated bounceInUp');
}, r*k);
});
// animate statistical widgets
$(".widget-stats")
.not('.kstych_init').addClass('kstych_init')
.css('visibility', 'hidden')
.each(function(k,v)
{
var t = $(this);
setTimeout(function(){
t.css('visibility', 'visible').addClass('animated fadeInDown');
}, 200*k);
});
// animate generic widgets
$(".box-generic")
.not('.kstych_init').addClass('kstych_init')
.filter(function(){
return !$(this).parents('.timeline-activity').length;
})
.css('visibility', 'hidden')
.each(function(k,v)
{
var t = $(this);
setTimeout(function(){
t.css('visibility', 'visible').addClass('animated fadeInUp');
}, 250*k);
});
// animate thumbnails
$(".thumbnail")
.not('.kstych_init').addClass('kstych_init')
.css('visibility', 'hidden')
.each(function(k,v)
{
var t = $(this);
setTimeout(function(){
t.css('visibility', 'visible').addClass('animated fadeInDown');
}, 200*k);
});
// animate thumbnails
$(".thumb")
.not('.kstych_init').addClass('kstych_init')
.filter(function(index) {
return !$(this).closest('.list-group-item').length;
})
.css('visibility', 'hidden')
.each(function(k,v)
{
var t = $(this);
setTimeout(function(){
t.css('visibility', 'visible').addClass('animated fadeInDown');
}, 100*k);
});
// animate tabs
$('.widget-tabs .tab-pane').not('.kstych_init').addClass('kstych_init').addClass('animated fadeInUp');
// animate page exits
// $('body')
// .on('click', 'a:not([data-toggle])', function(e)
// {
// if ($(this).is('[data-gallery]') || $(this).is('.no-ajaxify'))
// return true;
//
// e.preventDefault();
// var t = $(this);
//
// $('body').addClass('animated fadeOutLeft');
// setTimeout(function()
// {
// if (t.attr('href') == '#')
// location.reload();
// else
// location = t.attr('href');
// },
// 1000);
// });
//
}
}