1/** 2 * Arwa Animation Engine 3 * ActiveAxon 2013(c) 4 */ 5function zEng() { 6 var delay, speed, prog; 7 $('.animated').each(function() { 8 var el = $(this); 9 //console.log( elements[i] , i ); 10 if (el.visible(true)) { 11 if (el.data('animtype') == 'animate-progress') { 12 el.addClass('animatedVisi'); 13 prog = el.find('.team-member-progress-bar'); 14 prog.css('opacity', 1).css('width', el.data('progress-to')); 15 el.find('.team-member-progress-bar-value').html(el.data('progress-to')); 16 17 return; 18 } 19 20 delay = el.data('animdelay'); 21 if (!delay) { 22 delay = 0; 23 } 24 25 el.css('-webkit-animation-delay', delay); 26 el.css('-moz-animation-delay', delay); 27 el.css('-o-animation-delay', delay); 28 el.css('animation-delay', delay); 29 30 speed = el.data('animspeed'); 31 32 if (!speed) { 33 speed = 0.5; 34 } 35 36 el.css('-webkit-animation-duration', speed); 37 el.css('-moz-animation-duration', speed); 38 el.css('-o-animation-duration', speed); 39 el.css('animation-duration', speed); 40 41 if (el.data('animtype')) { 42 el.addClass(el.data('animtype')); 43 } 44 45 el.addClass('animatedVisi'); 46 // que.push(this); 47 } 48 else if (el.data('animrepeat') == '1') { 49 el.removeClass(el.data('animtype')); 50 el.removeClass('animatedVisi'); 51 } 52 }); 53} 54 55$(window).ready(zEng); 56$(window).load(zEng); 57 58 59$(window).scroll(function(event) { 60 zEng(); 61}); 62 63/* 64 * Viewport - jQuery selectors for finding elements in viewport 65 * 66 * Copyright (c) 2008-2009 Mika Tuupola 67 * 68 * Licensed under the MIT license: 69 * http://www.opensource.org/licenses/mit-license.php 70 * 71 * Project home: 72 * http://www.appelsiini.net/projects/viewport 73 * 74 */ 75(function($) { 76 77 78 /** 79 * Copyright 2012, Digital Fusion 80 * Licensed under the MIT license. 81 * http://teamdf.com/jquery-plugins/license/ 82 * 83 * @author Sam Sehnert 84 * @desc A small plugin that checks whether elements are within 85 * the user visible viewport of a web browser. 86 * only accounts for vertical position, not horizontal. 87 */ 88 89 $.fn.visible = function(partial) { 90 91 var $t = $(this), 92 $w = $(window), 93 viewTop = $w.scrollTop(),
94 viewBottom = viewTop + $w.height(), 95 _top = $t.offset().top, 96 _bottom = _top + $t.height(), 97 compareTop = partial === true ? _bottom : _top, 98 compareBottom = partial === true ? _top : _bottom; 99 100 return ((compareBottom <= viewBottom) && (compareTop >= viewTop)); 101 102 }; 103 104 105})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.