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