PageSourceSearch

https://kankou-iwaki.or.jp/js/sideAffix.js?v=97701ed0b6cd5e04a7d9a49d94c2d95b34638954

js kankou-iwaki.or.jp collected 2026-10-02 08:10:51 UTC 1,565 bytes, 64 lines download raw bytes

1(function($) {
2	$(function() {
3		// No Action
4	});
5	$(window).load(function() {
6
7		var paddingTop = 100;
8		var $affixTargetContent = $(".sideAffix .inner");
9		var $affixBaseContent = $(".sideAffix-target");
10
11		var onScroll = function() {
12			try {
13				windowScrollPosition = $(window).scrollTop();
14				windowHeight = $(window).height();
15				mainContentPosition = $affixBaseContent.offset().top;
16				mainContentHeight = $affixBaseContent.outerHeight();
17				sideContentHeight = $affixTargetContent.outerHeight() + 100;
18				mainContentBottomRelativePosition = mainContentPosition + mainContentHeight;
19				sideRemainHeight = mainContentBottomRelativePosition - windowScrollPosition;
20				sideBottomVal = windowHeight - (mainContentBottomRelativePosition - windowScrollPosition);
21
22				if (mainContentHeight < sideContentHeight) {
23					return false;
24				}
25
26				if (windowScrollPosition > (mainContentPosition - paddingTop))
27				{
28					$affixTargetContent
29						.addClass("fixed")
30						.css("top", "0")
31						.css("bottom", "auto")
32					;
33
34					if (sideRemainHeight < sideContentHeight) {
35						$affixTargetContent
36							.css("top", "auto")
37							.css("bottom", sideBottomVal + "px")
38						;
39					}
40					else {
41						$affixTargetContent
42							.css("top", paddingTop + "px")
43							.css("bottom", "auto")
44						;
45					}
46				}
47				else {
48					$affixTargetContent
49						.removeClass("fixed")
50						.css("top", "auto")
51						.css("bottom", "auto")
52						;
53				}
54			}
55			catch (e) {}
56		}
57
58		$(window).scroll(function () {
59			onScroll();
60		});
61		onScroll();
62	});
63})(jQuery);
64

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.