1(function($){ 2 3 function submenuEvents() { 4 function t() { 5 i.removeClass("opened"), i.off(), i.on("click", function () { 6 $(this).hasClass("opened") ? ($(this).children(".sub-menu").slideUp(400), $(this).removeClass("opened")) : ($(this).children(".sub-menu").slideDown(400), $(this).addClass("opened")) 7 }); 8 } 9 10 function e() { 11 i.removeClass("opened"), i.off(), i.hoverIntent(function () { 12 $(this).hasClass("opened") ? ($(this).children(".sub-menu").slideUp(400), $(this).removeClass("opened")) : ($(this).children(".sub-menu").slideDown(400), $(this).addClass("opened")) 13 }); 14 } 15 16 function n() { 17 $("#menu-primary li > a, #menu-main-navigation li > a").on("focus", function () { 18 $("#menu-primary li, #menu-main-navigationm li").removeClass("opened"), $(this).parent("li").hasClass("opened") || ($(this).siblings(".sub-menu").slideDown(400), $(this).parent().addClass("opened"), $(this).parent().siblings().removeClass("opened"), $(this).parent().siblings().children(".sub-menu").slideUp(400)) 19 }) 20 } 21 var i = $("nav .menu-primary-container #menu-primary li, #menu-main-navigation li"); 22 window.innerWidth <= 992 ? t() : (e(), n()) 23 } 24 25 function mobileMenu() { 26 var t = $("#hamburger-menu"); 27 window.innerWidth <= 992 ? (t.prepend($("#menu-gateway")), t.prepend($(".nav-utility")), t.prepend($("#menu-primary, #menu-main-navigation"))) : ($(".menu-gateway-container").prepend($("#menu-gateway")), $("header.banner .row:nth-child(3)").prepend($(".nav-utility")), $("header.banner .menu-primary-container, header.banner .menu-main-navigation-container").append($("#menu-primary, #menu-main-navigation"))) 28 } 29 30 function subnavToggle() { 31 // $("#subnav .current_page_ancestor .sub-menu > .menu-item-has-children, #subnav > .current_page_item .sub-menu > .menu-item-has-children").on("click", function () { 32 // $(this).children(".sub-menu").slideToggle(), $(this).toggleClass("opened"); 33 // }) 34 } 35 36 function subnavDisplay() { 37 function t() { 38 e.removeClass("opened"), e.off(), e.on("click", function () { 39 $(this).hasClass("opened") ? ($(this).siblings().slideUp(200), $(this).removeClass("opened")) : ($(this).siblings().slideDown(200), $(this).addClass("opened")) 40 }) 41 } 42 // var e = $("#subnav > li"); 43 // window.innerWidth <= 992 ? ($("#subnav").prependTo('div[role="document"]'), $("#subnav > li > .sub-menu").appendTo("#subnav").hide(), $("#subnav > li:not(:first)").hide(), t()) : ($('div[role="document"] .menu-utility-container').length > 0 ? $("#subnav").prependTo('div[role="document"] .menu-utility-container') : $('div[role="document"] .menu-primary-container').length > 0 ? $("#subnav").prependTo('div[role="document"] .menu-primary-container') : $("#subnav").prependTo('div[role="document"] .menu-main-navigation-container'), $("#subnav > .sub-menu").appendTo("#subnav > li").show(), $("#subnav > li:not(:first)").show(), $("#subnav > li").unbind("click")) 44 } 45 46 function promotileHeight() { 47 var t = $(".promotile").width(), 48 e = $(".promotile-float").width() + 40; 49 $(".promotile").height(t), $(".promotile img").attr("style", "min-height:" + e + "px") 50 } 51 52 function imagecardHeight() { 53 $(".imagecard-image").each(function () { 54 var t = $(this).parents(".imagecard").height(); 55 window.innerWidth >= 992 && $(this).height(t) 56 }) 57 } 58 59 function perCreditCourse() { } 60 61 function tabAccordion() { 62 if ($(".su-other-shortcodes-loaded").length) { 63 var t = $(".tabaccordion .su-spoiler-content"), 64 e = $(".tabaccordion .su-spoiler"), 65 n = []; 66 if (e.attr("tabindex", "0"), t.each(function () { 67 $(this).attr("tabindex", "0"), n.push($(this)) 68 }), window.innerWidth >= 992) t.each(function () { 69 $(this).appendTo($(this).parents(".tabaccordion")) 70 }), e.on("click focus", function () { 71 for (var t = 0; t < n.length; t++) $(this).index() === t && ($(".tabaccordion .su-spoiler-content").hide(), n[t].fadeIn()) 72 }), e.each(function () { 73 for (var e = 0; e < t.length; e++) $(this).index() !== e || $(this).hasClass("su-spoiler-closed") || t.each(function () { 74 var n = e + t.length; 75 $(this).index() === n ? $(this).show() : $(this).hide() 76 }) 77 }), e.append('<svg class="triangle" viewBox="0 0 100 10" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="0 0 100 0 50 10"></polygon></svg>'); 78 else 79 for (var i = 0; i < n.length; i++) e.each(function () { 80 $(this).index() === i && $(this).append(n[i]) 81 }) 82 } 83 } 84 85 function applyRegister() { 86 var t = 1; 87 $(".su-accordion.apply-register .su-spoiler-icon").wrap('<div><p class="step">Step</p></div>'), $(".su-accordion.apply-register .su-spoiler-icon").each(function () { 88 $(this).html(t), t++ 89 }) 90 } 91 92 function accessibleAccordions() { 93 if ($(".su-other-shortcodes-loaded").length) { 94 var t = $(".su-accordion .su-spoiler"); 95 e = $(".su-accordion .su-spoiler-content"); 96 t.attr("tabindex", "0"); 97 e.attr("tabindex", "-1");
98 t.on("keydown", function () { 99 myself = $(this); 100 $(this).removeClass("su-spoiler-closed"); 101 t.siblings().each(function () { 102 if ((myself != $(this)) && ($(this).hasClass("su-spoiler-closed"))) { 103 $(this).addClass("su-spoiler-closed"); 104 } 105 }); 106 }); 107 t.on("focus,click", function () { 108 myself = $(this); 109 $(this).removeClass("su-spoiler-closed"); 110 t.siblings().each(function () { 111 if ((myself != $(this)) && ($(this).hasClass("su-spoiler-closed"))) { 112 $(this).addClass("su-spoiler-closed"); 113 } 114 }); 115 }) 116 } 117 } 118 119 function promocard() { 120 window.innerWidth <= 576 ? $(".promocard-left").each(function () { 121 $(this).appendTo($(this).parents(".promocard")) 122 }) : $(".promocard-left").each(function () { 123 $(this).prependTo($(this).parents(".promocard")) 124 }) 125 } 126 127 function suCarousel() { } 128 129 $(".content-slide").wrapAll('<div class="content-slider" aria-label="Slider for News Stories"></div>'), 130 $(document).ready(function () { 131 $("#menu-primary > li > a:not(.menu-description)").attr("tabindex", "-1"); 132 $("#hamburger-btn p").on("click", function () { 133 $(this).find("span").toggleClass("fa-bars fa-close") 134 }); 135 $("#hamburger-btn").on("click", function () { 136 $("#hamburger-menu").slideToggle() 137 }); 138 $(".content-slider").owlCarousel({ 139 loop: !0, 140 responsiveClass: !0, 141 items: 1, 142 nav: !0, 143 dots: !0, 144 navText: ['<span class="fa fa-chevron-left"></span>', '<span class="fa fa-chevron-right"></span>'] 145 }); 146 submenuEvents(); 147 mobileMenu(); 148 subnavToggle(); 149 subnavDisplay(); 150 applyRegister(); 151 promocard(); 152 imagecardHeight(); 153 accessibleAccordions(); 154 }); 155 $(window).on("load", function () { 156 suCarousel(); 157 tabAccordion(); 158 promotileHeight(); 159 accessibleAccordions(); 160 }); 161 $(window).on("resize", function () { 162 suCarousel(); 163 mobileMenu(); 164 submenuEvents(); 165 subnavDisplay(); 166 tabAccordion(); 167 promocard(); 168 promotileHeight(); 169 imagecardHeight(); 170 }); 171})(jQuery); 172 173function closeOldBrowsers() { 174 jQuery(".old_browsers").hide(); 175 x = document.cookie = "necc_nomoreie=necc;path=/;domain=.mass.edu"; 176} // function closeOldBrowsers() 177 178//# sourceMappingURL=main.js.map 179 180// Function to detect Android devices and cancel the redraw event that causes the soft keyboard to disappear when tapping on a text box 181var ua = navigator.userAgent.toLowerCase(); 182var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile"); 183if (isAndroid) { 184 // input is in focus, don't do nothing or input loses focus and keyboard dissapears 185 jQuery('input[type="text"]').bind('click', function (evt) { 186 var focusClosure = (function (inputElem) { 187 return function () { 188 console.log(inputElem.focus()); 189 } 190 }($(evt.target))); 191 window.setTimeout(evt.target, 2000); 192 console.log("android resizing event"); 193 $(evt.target).focus(); 194 $(evt.target).value = "android"; 195 }); 196 jQuery(window).unbind('resize'); 197}
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.