1 /*$('#main_left').click(function () { 2 if ($(".main_left_submenu").css('left') === '0px') { 3 4 //location.reload() 5 } else { 6 $('#main_left').addClass('lol') 7 } 8}) */ 9 10//Apre e chiude i sottomenu 11$(document).ready(function($) { 12 var width = $(window).width(); 13 14 $(window).on('resize', function() { 15 width = $(window).width(); 16 }); 17 18 $("ul").has("div.left_side_menu").click(function () { 19 20 if (width < 1050) { 21 $(this).children('.main_left_submenu').toggle(); 22 $('ul').not(this).find('.main_left_submenu').hide(); 23 $('ul').not(this).children('div').children('span').removeClass('menu_up'); 24 $('ul').not(this).children('div').children('span').addClass('menu_down'); 25 $(this).children('div').children('span').toggleClass('menu_up menu_down'); 26 } else { 27 $('ul.current').hide(); 28 } 29 30 }); 31 32}); 33 34 const deviceType = () => { 35 const ua = navigator.userAgent; 36 if (/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(ua)) { 37 return "tablet"; 38 } 39 else if (/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(ua)) { 40 return "mobile"; 41 } 42 return "desktop"; 43 }; 44 window.addEventListener('load', function() { 45 document.body.classList.add(`device-${['mobile', 'tablet'].indexOf(deviceType()) !== -1 ? 'mobile': 'desktop'}`); 46 var link = document.querySelector('#main_left_mobile_hover'); 47 48 link && link.addEventListener('click', function(e) { 49 e.stopPropagation() 50 return false; 51 }, false); 52 document.querySelectorAll('table.xs-table').forEach(function(table) { 53 var div = document.createElement('div'); 54 div.style.overflowX = 'auto'; 55 table.parentNode.insertBefore(div, table); 56 table.style.minWidth = '960px'; 57 div.appendChild(table); 58 }); 59 }) 60 61//Per eliminare immagine vuota 62function imgError(image) { 63 var imageRow = image.parentNode; 64 var title = imageRow.nextSibling.style.marginTop = "0px"; 65 imageRow.style.display = 'none'; 66 67} 68 69 (function() { 70 'use strict'; 71 72 function onDocumentReady() { 73 var buttonFuture = document.querySelector('.button-future'); 74 let submenu = buttonFuture.querySelector('.submenu-student'); 75 buttonFuture.querySelector('a').addEventListener('click', function(e) { 76 // e.preventDefault(); 77 // submenu.style.display = 'block'; 78 // submenu.classList.add('open'); 79 }, true); 80 // document.addEventListener('click', function(event) { 81 // var isClickInside = buttonFuture.contains(event.target); 82 // if (!isClickInside) { 83 // submenu.style.display = 'none'; 84 // submenu.classList.remove('open'); 85 // } 86 // }); 87 var tm = false; 88 buttonFuture.querySelector('a').addEventListener('mouseenter', function() { 89 // submenu.style.display = 'unset'; 90 submenu.style.display = 'block'; 91 submenu.classList.add('open'); 92 submenu.addEventListener('mouseenter', function () { 93 tm = true; 94 }) 95 submenu.addEventListener('mouseleave', function () { 96 tm = false; 97 submenu.style.display = 'none'; 98 submenu.classList.remove('open'); 99 }) 100 }); 101 buttonFuture.querySelector('a').addEventListener('mouseleave', function() { 102 setTimeout(function() { 103 if (!tm) { 104 submenu.style.display = 'none'; 105 submenu.classList.remove('open'); 106 } 107 }, 20); 108 }); 109 } 110 111 if (document.readyState !== 'loading') { 112 onDocumentReady(); 113 } else { 114 document.addEventListener('DOMContentLoaded', onDocumentReady); 115 } 116 }());
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.