-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedu.js
More file actions
45 lines (40 loc) · 1.64 KB
/
Copy pathedu.js
File metadata and controls
45 lines (40 loc) · 1.64 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
$(document).ready(function(){
var $animation_elements = $('.anim');
var $window = $(window);
function check_if_in_view() {
var window_height = $window.height();
var window_top_position = $window.scrollTop();
var window_bottom_position = (window_top_position + window_height);
$.each($animation_elements, function() {
var $element = $(this);
var element_height = $element.outerHeight();
var element_top_position = $element.offset().top;
var element_bottom_position = (element_top_position + element_height);
//check to see if this current container is within viewport
if ((element_bottom_position >= window_top_position) &&
(element_top_position <= window_bottom_position)) {
$element.addClass('animated');
} else {
$element.removeClass('animated');
}
});
}
$window.on('scroll resize', check_if_in_view);
$window.trigger('scroll');
});
/**********************Scroll Animation "END"************************************/
/**********************Change color of center aligned animated content small Circle "START"************************************/
$(document).ready(function(){
$(" .debits").hover(function(){
$(" .center-right").css("background-color", "#4997cd");
}, function(){
$(" .center-right").css("background-color", "#fff");
});
});
$(document).ready(function(){
$(".credits").hover(function(){
$(".center-left").css("background-color", "#4997cd");
}, function(){
$(".center-left").css("background-color", "#fff");
});
});