PageSourceSearch

https://roiscs.com/wp-content/themes/roiregard/js/our-custom.js?321

js roiscs.com collected 2026-10-04 15:01:08 UTC 3,643 bytes, 181 lines download raw bytes

1( function( $ ) {
2"use strict";
3
4    $( document ).ready( function() {
5    
6		
7		
8		//From JSON config in data attribute in HTML
9		var $scrollRevealElements = $( '[data-uix-anim]' ),
10			tmAnim = function( obj, type ) {
11
12				var config = obj.data( 'uix-anim' );
13
14				if( typeof config === typeof undefined || config == '' || config === false ) {
15					config = {
16						"from"     : {"opacity":0,"x":70},
17						"to"       : {"opacity":1,"x":0},
18						"ease"     : "Power2.easeOut",
19						"duration" : 0.8,
20						"delay"    : 0,
21						"infinite" : false
22					};
23				}
24				
25			
26				//get attributes to tweenMax
27				var fromCSS     = config.from,
28					toCSS       = config.to,
29					myEase      = config.ease,
30					myDuration  = config.duration,
31					myDelay     = config.delay,
32					infinite    = config.infinite;
33				
34			
35				//Initialize the state of the element
36				if ( type == 'from' ) {
37					TweenMax.set( obj, {
38						css        : fromCSS
39					});	
40
41				}
42				
43				if ( type == 'from-anim' ) {
44					TweenMax.to( obj, myDuration, {
45						css        : fromCSS
46					});	
47
48				}
49
50				//Target animation
51				if ( type == 'to' ) {
52					
53					TweenMax.to( obj, myDuration, {
54						css    : toCSS,
55						ease   : myEase,
56						delay  : myDelay
57					});		
58					
59
60				}	
61				
62				
63				//Reversing Scroll Animations for Loop  
64				if ( type == 'loop' ) {
65					if ( infinite ) {
66						return 1;
67					} else {
68						return 0;
69					}	
70				}
71
72				
73
74			};
75
76
77		$scrollRevealElements.each( function()  {
78			tmAnim( $( this ), 'from' );
79		});
80
81					
82		var waypoints = $scrollRevealElements.waypoint({
83			handler: function( direction ) {
84
85				//$( this.element ).toggleClass( 'animated fadeInUp', direction === 'down' );
86				var tmLoop = tmAnim( $( this.element ), 'loop' );
87				
88				if ( tmLoop === 1 ) {
89					if ( direction === 'up' ) {
90						tmAnim( $( this.element ), 'from-anim' );
91					} else {
92						tmAnim( $( this.element ), 'to' );
93					}
94				} else {
95					tmAnim( $( this.element ), 'to' );
96				}
97
98			},
99			offset: '100%' //0~100%, bottom-in-view
100		});
101	
102		
103		
104    } );
105    
106} ) ( jQuery );
107
108
109
110// jQuery(document).ready(function($) {
111// "use strict";
112// $('#customers-testimonials').owlCarousel( {
113// 		loop: true,
114// 		center: true,
115// 		items: 3,
116// 		margin: 30,
117// 		autoplay: true,
118// 		dots:true,
119//     nav:true,
120// 		autoplayTimeout: 8500,
121// 		smartSpeed: 450,
122//   	navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
123// 		responsive: {
124// 			0: {
125// 				items: 1
126// 			},
127// 			768: {
128// 				items: 2
129// 			},
130// 			1170: {
131// 				items: 3
132// 			}
133// 		}
134// 	});
135// });
136
137
138
139
140
141jQuery(document).ready(function( $ ) {
142
143// Hide Header on on scroll down
144var didScroll;
145var lastScrollTop = 0;
146var delta = 5;
147var navbarHeight = $('header').outerHeight();
148
149$(window).scroll(function(event){
150    didScroll = true;
151});
152
153setInterval(function() {
154    if (didScroll) {
155        hasScrolled();
156        didScroll = false;
157    }
158}, 250);
159
160function hasScrolled() {
161    var st = $(this).scrollTop();
162    
163    // Make sure they scroll more than delta
164    if(Math.abs(lastScrollTop - st) <= delta)
165        return;
166    
167    // If they scrolled down and are past the navbar, add class .nav-up.
168    // This is necessary so you never see what is "behind" the navbar.
169    if (st > lastScrollTop && st > navbarHeight){
170        // Scroll Down
171        $('#wrapper-navbar').removeClass('nav-down').addClass('nav-up');
172    } else {
173        // Scroll Up
174        if(st + $(window).height() < $(document).height()) {
175            $('#wrapper-navbar').removeClass('nav-up').addClass('nav-down');
176        }
177    }
178    
179    lastScrollTop = st;
180}
181});

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.