PageSourceSearch

https://www.lecrespatrimoine.fr/js/script_minisite.js

js lecrespatrimoine.fr collected 2026-10-03 18:43:59 UTC 3,691 bytes, 156 lines download raw bytes

1 $(document).ready(function () {
2
3  /*fonction redimension bloc (redimensionner('.selecteur');)*/
4  function redimensionner(e){var h=0;jQuery(e).each(function(){jQuery(this).height()>h&&(h=jQuery(this).height())}),jQuery(e).each(function(){jQuery(this).height(h)})}
5 //redimensionner('#B1 .redac .resume');
6
7/******************************** CAROU*******************************/
8
9/*SWIPE*/
10 $(".index #carrousel_classique").swiperight(function() {  
11    $(this).carousel('prev');  
12	});  
13$(".index #carrousel_classique").swipeleft(function() {  
14	$(this).carousel('next');  
15 	});  
16
17
18
19$('#img_bandeau .carousel').attr({
20	id: 'carousel_fade',
21	'data-ride' : 'carousel_fade'
22});
23$('#carousel_fade').addClass('carousel-fade');
24
25
26redimensionner('#encart_fond_index_B1 .redac');
27
28/************************************ ACTU ************************************/
29$('.index.522 #B1').append( "<a href='https://www.lecres.fr/index.php/_minisite2_/display/Agora?idpage=563' title='Plus de manifestations' class ='btn btn-default' id='all_event'>Voir tous les événements </a>" );	
30
31$('.index #encart_fond_index_B1 .redac').each(function(index) {						
32	$('.titreactu',this).prependTo($('.resume',this));
33	$(this).addClass('col-sm-6');
34});
35$('#B1  img').addClass('img-responsive');
36setTimeout(function(){
37$('#calendrierA1.page524 .redac').each(function(index) {						
38	//$('.wrapp-vign',this).insertAfter($('.titre',this));
39	
40});
41
42}, 300);
43
44
45
46var oldSrc = 'https://www.lecres.fr/images2/lirelasuite.png';
47var newSrc = 'https://www.lecres.fr/css/minisite_522/images/lirelasuite.png';
48/*$('.index .imglire[src="' + oldSrc + '"]').attr('src', newSrc);*/
49setTimeout(function(){
50$('.interne .imglire[src="' + oldSrc + '"]').attr('src', newSrc);
51}, 200);
52
53/*calendrier*/	
54setTimeout(function(){
55$('#calendrierA1 > .container').addClass('wrapp').removeClass('container');	
56$('.page187 .redac').each(function(index) {						
57	$('.wrapp-vign',this).insertBefore($('.resume',this));	
58});
59}, 300);
60/************************ Deplacement des blocs *********************************/
61
62
63	function modeRs(){
64		$("#conteneur_index #bloc_acces_rapide").removeClass('col-md-4').addClass('container');	
65		$('#menucontextuel_ .encart_fond').attr({
66			'class': 'encart_fond collapse',
67			id: 'collapseContextuel'
68		});
69		$('#menucontextuel_ .haut_sommaire a').attr({
70			'data-toggle': 'collapse',
71			href: '#collapseContextuel',
72			'aria-expanded': 'false',
73			'aria-controls': 'collapseContextuel',
74			'class': 'collapsed'
75		});
76		$('#menucontextuel_ .haut_sommaire h1').addClass('menuC');		
77
78		setTimeout(function(){
79				$("#carou_actu").css('height', 'inherit');	
80			}, 3000);		
81		
82	}
83
84
85	function modeNormal(){
86		$('#menu_interne').insertAfter($('#contenu_dynamique'));
87	
88	}
89
90
91	function deplacerBloc(){
92		
93	
94	}
95		function retablirBloc(){
96			
97	
98	}
99
100
101	var bodySize = $("body").width();
102	
103	if(bodySize < 980){	
104		modeRs();
105			
106		if(bodySize < 769){
107			modeRs();
108			deplacerBloc();	
109							
110		}		
111	}else{		
112		modeNormal();	
113		retablirBloc();
114			
115				
116	}
117
118	var waitForFinalEvent = (function() {
119			var timers = {};
120			 return function(callback, ms, uniqueId) {
121			if (!uniqueId) {
122			  uniqueId = "uniqueId";
123			}
124			if (timers[uniqueId]) {
125			  clearTimeout(timers[uniqueId]);
126			}
127			timers[uniqueId] = setTimeout(callback, ms);
128			 };
129		})();
130	
131	
132	$(window).resize( function() { 
133		waitForFinalEvent(function() {
134			
135			 if ($(this).width() < 980){
136					modeNormal();				
137					retablirBloc();
138				 if ($(this).width() <769){
139					modeRs();
140					deplacerBloc();	
141				}else{
142					retablirBloc();			
143				}
144			}else  if ($(this).width() > 980){				
145				modeNormal();	
146				retablirBloc();	
147			}
148		}, 500);
149	} );
150 
151
152
153
154			
155
156});

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.