1(function ($) { 2 if ($("#formations-and-modules").length == 0) { 3 $('.arrow-to-formations').on('click', function() { 4 $('html, body').animate({ scrollTop: $('#formations').offset().top - $('#nav').outerHeight() - 20 }, 800); 5 }); 6 7 $('.block .arrow').on('click', function() { 8 var $block = $(this).parent(); 9 10 if ($block.hasClass('opened')) { 11 $block.css('max-height', $block.find('.titles').height() + 40); 12 $block.removeClass('opened'); 13 } 14 else { 15 var $openedBlock = $block.parents('.row').find('.block.opened'); 16 $openedBlock.removeClass('opened').css('max-height', $openedBlock.find('.titles').height() + 40); 17 18 $block.addClass('opened'); 19 $block.css('height', 'auto'); 20 21 setTimeout(function() { 22 $('html, body').animate({ scrollTop: $block.offset().top - $('#nav').outerHeight() - 10 }, 800); 23 }, 800); 24 } 25 26 return false; 27 }); 28 29 $('.place-li').on('click', function(event) { 30 place_itemClick(event,this); 31 }); 32 33 34 onResize(); 35 $(window).on('resize', onResize); 36 } 37 38})(jQuery); 39 40 41function onResize() { 42 if (this.conceptTimeout) 43 clearTimeout(this.conceptTimeout); 44 this.conceptTimeout = setTimeout(function() { 45 if ($(window).innerWidth() >= 992) { 46 $('#formations .block:not(.block-green)').each(function(index, block) { 47 $(block).css({ 'max-height': 'none', 'height': '100%' }); 48 }); 49 50 $('#formations .row').each(function(index, row) { 51 var maxTitleHeight = 0; 52 var maxTimeHeight = 0; 53 54 var $allBlocks = $(row).find('.block:not(.block-green):not(.module)'); 55 56 $allBlocks.each(function(index, block) { 57 var titleHeight = $(block).find('.big-title').height(); 58 var timeHeight = $(block).find('.time').height(); 59 60 if (titleHeight > maxTitleHeight) 61 maxTitleHeight = titleHeight; 62 if (timeHeight > maxTimeHeight) 63 maxTimeHeight = timeHeight; 64 }); 65 66 $allBlocks.find('.big-title').css('height', maxTitleHeight); 67 $allBlocks.find('.time').css('height', maxTimeHeight); 68 69 $(row).find('.block').css('height', $(row).height() - 30); 70 }); 71 } 72 else { 73 //$('#formations .big-title, #formations .time, #formations .block-green').css('height', 'auto'); 74 $('#formations .big-title, #formations .time').css('height', 'auto'); 75 76 $('#formations .block:not(.block-green, .opened)').each(function() { 77 var $block = $(this); 78 $block.css('max-height', $block.find('.titles').height() + 40); 79 }); 80 } 81 }, 300); 82 83 84 if ($(window).innerWidth() < 360) { 85 $('#formations .block-green.on-mobile .btn span').text("Prendre un RV"); 86 } 87 else { 88 $('#formations .block-green.on-mobile .btn span').text("Prendre un rendez-vous"); 89 } 90}
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.