PageSourceSearch

https://lawyersniagara.com/scripts/pageSlider.js

js lawyersniagara.com collected 2026-10-06 13:14:23 UTC 1,982 bytes, 61 lines download raw bytes

1var ratio = 1920/1080;
2$(window).on("resize load", function(){
3	$(".slider").height($(window).height());
4	$(".slider").width($(window).width());
5	
6	if($(".slider img").width() < $(window).width()){
7		$(".slider img").css("width", $(window).width());
8		$(".slider img").css("height", "auto");
9	}
10	else if($(".slider img").height() < $(window).height()){
11		$(".slider img").css("height", $(window).height());
12		$(".slider img").css("min-width", $(window).height()*ratio);
13	}
14	else if(($(".slider img").width() > $(window).width()) && ($(".slider img").height() > $(window).height())){
15		$(".slider img").css("min-width", $(window).width());
16		$(".slider img").css("width", $(window).width());
17		$(".slider img").css("height", "auto");
18	}
19});
20$(window).on("scroll", function(){
21	if($(window).scrollTop() < $(".navigation").height()){
22		$(".slider img").css("height", $(window).height()+200);
23		$(".slider img").css("min-width", ($(window).height()+200)*ratio);
24		
25	}
26});
27$(window).load(function(){
28	$.fn.nextOrFirst = function(selector){
29		var next = this.next(selector);
30		this.attr("data-visible", false);
31		if(next.length){
32			next.attr("data-visible", true);
33			return next;
34		}
35		else{
36			this.siblings().first().attr("data-visible", true);
37			return this.siblings().first();
38		}
39	};
40	$.fn.prevOrLast = function(selector){
41		var prev = this.prev(selector);
42		return (prev.length) ? prev : this.siblings().last();
43	};
44	$(".slider img").show();
45	$(".slider img").css("z-index", -1);
46	$(".slider img:first").css("z-index", 1).attr("data-visible", true);
47	if($(".slider img").length > 1){
48		var InfiniteRotator = {
49			init: function(){
50				var timeout = 4000;
51				var animation = 2000;
52				var innerLoop = setInterval(function(){
53				$(".slider img[data-visible='true']").css("z-index", 1).nextOrFirst().css("z-index", 0).prevOrLast().fadeOut(animation, function(){
54					$(this).css("z-index", -1).show();
55				});
56				}, (timeout+animation));
57			}
58		}
59		InfiniteRotator.init();
60	}
61});

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.