PageSourceSearch

https://www.lafayette.edu/wp-content/themes/marquis-base/src/js/animations.js?ver=3.17.15

js lafayette.edu collected 2026-10-01 08:37:53 UTC 1,256 bytes, 48 lines download raw bytes

1/*-------------------------------------------
2  Animation Effects
3-------------------------------------------*/
4gsap.registerPlugin(ScrollTrigger);
5
6MarquisFX = (function($) {
7	var $animateElements;
8
9	var fromEffects = {
10		"opacity" : {opacity: "0"},
11		"ttb" : {y: "-100%"},
12		"btt" : {y: "200%"},
13		"ltr" : {x: "-100%"},
14		"rtl" : {x: "200%"}
15	};
16
17function init() {
18	$animateElements = $('.marquis_fx .marquis_fx_callout');
19
20	// Loops through each callout and find any element with the marquis_fx_element class.
21	// It then looks at a data attribute for what effect to use.
22	$($animateElements).each(function(index){
23
24		$(this).find('.marquis_fx_element').each(function(i){
25			var element = $(this);
26			var effects = {};
27			var data = $(this).data('marquis-fx').split(',');
28			$(data).each(function(){
29				effects = Object.assign(effects,fromEffects[this]);
30			});
31			var scrollTrigger = {
32				scrollTrigger: {
33					trigger: element,
34					duration: 1,
35					start: 'top bottom-=30%'
36				}
37			}
38			var gsapParameters = Object.assign(effects,scrollTrigger);
39			gsap.from(element, gsapParameters);
40		});
41
42	});
43	}
44	//Make sure the document has loaded before trying to find elements.
45	$(document).ready(init);
46})(jQuery);
47
48//# sourceMappingURL=animations.js.map

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.