1/* #PRODUIRE{fond=js/scolaspip.js} 2 md5:5277aa45f4b4c8e7e5a38ef77491bcfa */ 3 4function activeToggleBreves() { // on masque les contenus des breves, on mets les boutons + et on active l'action 5 if ($(".liste.breves li.item div.contenu_breve").css("display")!="none"){ 6 $(".liste.breves li.item div.contenu_breve").css({display:'none'}); 7 $(".liste.breves li.item h3.h3 a").removeClass("ouvert"); 8 $(".liste.breves li.item h3.h3 a").addClass("ouvrable"); 9 $(".liste.breves li.item h3.h3").click(function(){ // Affichage des breves 10 $(this).next().slideToggle(); 11 $(this).children().toggleClass("ouvrable"); 12 $(this).children().toggleClass("ouvert"); 13 return false; 14 }); 15 } 16} 17$.removeCookie = function (key, options) { 18 if (Cookies.get(key) === undefined) { 19 return false; 20 } 21 // Must not alter options, thus extending a fresh object... 22 Cookies.set(key, '', $.extend({}, options, { expires: -1 })); 23 return !Cookies.get(key); 24}; 25$(function() { 26 // bouton retour haut de page 27 $( "body" ).append( '<div id="backtotop" title="Haut de page"><span>â²</span></div>' ); 28 $(window).scroll(function() { 29 if($('html').scrollTop() > 300 || $('body').scrollTop() > 300) { $('#backtotop').fadeIn();} 30 else { $('#backtotop').fadeOut(); } 31 }); 32 $('#backtotop').on('click',function() { 33 $('html,body').animate({ scrollTop: 0 }, 900, function() { 34 $("html, body").off("scroll mousedown DOMMouseScroll mousewheel keyup"); 35 }); 36 return false; 37 }); 38 39 // liens externes : dans une nouvelle fenetre 40 $('a.spip_out,.articles-virtuels a').attr("target", "_blank"); 41 42 activeToggleBreves(); 43 if (typeof onAjaxLoad == 'function') onAjaxLoad(activeToggleBreves); // callback pour les breves lors de pagination ajax (merci astuces spip) 44 45 // carousel 46 if (!Cookies.get('stop-carousel')) { 47 $('#carousel').carousel({interval:8000}); 48 $('#carousel-pause-cancel').hide(); 49 } 50 else{ 51 $('#carousel-pause').hide(); 52 } 53 //bouton arret temporaire du carousel 54 $('#carousel-pause').on('click',function(){ 55 $('#carousel').carousel('pause'); 56 Cookies.set('stop-carousel', true, { expires: 7 }); 57 $(this).hide(); 58 $('#carousel-pause-cancel').show(); 59 return false; 60 }); 61 //bouton arret/reprise definitive du carousel 62 $('#carousel-pause-cancel').on('click',function() { 63 $.removeCookie('stop-carousel'); 64 $('#carousel').carousel('next'); 65 $('#carousel').carousel({interval:8000}); 66 $(this).hide(); 67 $('#carousel-pause').show(); 68 return false; 69 }); 70});
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.