PageSourceSearch

https://www.horizon-custom-homes.com/_js/jquery/extensions.js

js horizon-custom-homes.com collected 2026-09-25 01:52:12 UTC 2,399 bytes, 73 lines download raw bytes

1(function ($) {
2	$.expr[":"].childOf = function () {
3		return ($(arguments[0]).parents(arguments[2][3]).length > 0);
4	}
5	$.extend({
6		increment : function ( string ) {
7			var incrementBy = (!isNaN(parseInt(arguments[1])) ? parseInt(arguments[1]) : 1), pattern = new RegExp(/\d+/gi);
8			return (string.length && string.match(pattern) ? string.replace(pattern, parseInt(string.match(pattern)[0]) + incrementBy) : string + incrementBy);
9		}
10	});
11	$.fn.extend({
12		appendChain : function (element) {
13			var children = [];
14			this.each(function () {
15				that = $(document.createElement("div")).append(element);
16				that.children().each(function () { children.push(this); }).appendTo(this);
17				that.remove();
18			});
19			return $(children);
20		},
21		increment : function ( key ) {
22			var incrementBy = (arguments[1] || 1);
23			return this.each(function () {
24				$(this).attr(key, $.increment($(this).attr(key), incrementBy));
25			});
26		},
27		prependChain : function (element) {
28			var children = [];
29			this.each(function () {
30				that = $(document.createElement("div")).append(element);
31				that.children().each(function () { children.push(this); }).prependTo(this);
32				that.remove();
33			});
34			return $(children);
35		},
36		scrollTo : function (top, left, speed) {
37			left = (typeof left == "number" ? left : 0);
38			speed = (typeof speed == "number" ? speed : 0);
39			top = (typeof top == "number" ? top : 0);
40			this.each(function () {
41				if (speed > 0) jQuery(this).animate({ scrollLeft : left, scrollTop : top }, speed);
42				else if (this.scrollTo) this.scrollTo(left, top);
43			});
44			return this;
45		},
46		scrollToTop : function (speed) {
47			this.each(function () {
48				scrollTo(0, 0, speed);
49			});
50		},
51		stopLoading : function () {
52			if (navigator.userAgent.search(/msie/gi) >= 0) {
53				if (jQuery(document).children("iframe#stopLoading").length == 0) {
54					iframe = document.createElement("iframe");
55					iframe.height = iframe.width = 1;
56					iframe.id = iframe.name = "stopLoading";
57					document.appendChild(iframe);
58				}
59				jQuery(document).children("iframe#stopLoading").attr("src", "");
60			}
61		}
62	});
63	if (!$().delay)
64		$.fn.extend({
65			delay : function (time,func) {
66				this.each(function(){
67					if (typeof(x) == "number") clearTimeout(x);
68					x = setTimeout(func,time);
69				});
70				return this;
71			}
72		});
73})(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.