PageSourceSearch

https://www.fpa2.org/js/front-socle.js

js fpa2.org collected 2026-10-03 02:53:27 UTC 2,759 bytes, 104 lines download raw bytes

1$(function()
2	{
3	$('*[data-toggle]').click(function ()
4		{
5		if ($(this).data("toggledest"))
6			$($(this).data("toggledest")).toggleClass($(this).attr("data-toggle"));
7		else
8			$(this).toggleClass($(this).attr("data-toggle"));
9		});
10
11	$(document).on( 'scroll', function()
12		{
13		var dheight=$('body').height()-$(window).height();
14		if ($('header').data("scroll")!='')
15			var aTop = parseInt($('header').data("scroll"));
16		else
17			var aTop = $('header').height();
18
19		// console.log (dheight*.75+' | '+$(this).scrollTop());
20
21		// gestion du menu header
22		if ( $(this).scrollTop()>=aTop && !$('header').hasClass("fixed"))
23			$('header').addClass("fixed");
24		else if ( $(this).scrollTop()==0 && $('header').hasClass("fixed"))
25			$('header').removeClass("fixed");
26
27		// gestion du bouton ontop
28		if ($(this).scrollTop()>=dheight*.75  && !$('.ontop').hasClass("ontop_showed")  && dheight>0)
29			$('.ontop').addClass("ontop_showed");
30		else if ($(this).scrollTop()<dheight*.75  && $('.ontop').hasClass("ontop_showed"))
31			$('.ontop').removeClass("ontop_showed");
32
33		});
34
35	$(window).on("resize",function()
36		{
37		// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
38		// Then we set the value in the --vh custom property to the root of the document
39		var vh = window.innerHeight * 0.01;
40		document.documentElement.style.setProperty('--vh', `${vh}px`);
41		});
42
43	$('.ontop').click(function()
44		{
45		$('html, body').animate({scrollTop:0}, 'slow');
46		return false;
47		});
48
49	// Gestion des labels dans les formulaires
50
51	focusable=$('.rowElem input, .rowElem select, .rowElem textarea');
52
53	// Focus: Show label
54	focusable.focus(function(){
55		$("label[for='"+$(this).attr("id")+"']").addClass('show-label');
56		});
57
58	// Blur: Hide label if no value was entered (go back to placeholder)
59	focusable.blur(function(){
60		if ($(this).val() === '')
61		  $("label[for='"+$(this).attr("id")+"']").removeClass('show-label');
62		});
63
64	// Etat initial
65	focusable.each(function(index){
66		if ($(this).val() != '')
67		  $("label[for='"+$(this).attr("id")+"']").addClass('show-label');
68		});
69
70
71	// Page Effects !
72/*
73	if($("body").attr("data-effectout")!=undefined)
74		{
75		$('a').click(function()
76			{
77			var that = this;
78
79			$("body").addClass("effect_out");
80
81			setTimeout(function()
82				{
83				window.location=that.href;
84				},$("body").attr("data-effectout"));
85
86			return false;
87			});
88		}
89
90	if($("body").attr("data-effectin")!=undefined)
91		{
92		$(window).load( function()
93			{
94			setTimeout(function()
95				{
96				$("body").addClass("effect_in");
97				},$("body").attr("data-effectin"));
98			});
99		}
100*/
101	
102	$(window).trigger("resize");
103	$(document).scroll();
104	});

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.