1$(document).ready(function() { 2 3 const toggleMenu = document.querySelectorAll('.sys_menu-toggle'); 4 for(let i = 0; i < toggleMenu.length; i++) { 5 toggleMenu[i].tabIndex = 0; 6 } 7 8 // clear default text from search boxes 9 $("#header .sys_right fieldset input, #internal #main #pageTools fieldset input, #internal #main input#jobSearch, .sys_pressanykey input, #header #search input").focus(function (i) { 10 if($(this).attr("value") == "keyword(s)") { 11 $(this).attr("value", ""); 12 }; 13 }).blur(function (i) { 14 if($(this).attr("value") == "") { 15 $(this).attr("value", "keyword(s)"); 16 }; 17 }); 18 19}); 20 21/*Add a DIV to tables for responsive views*/ 22$(function() { 23$("table").wrap( "<div class='responsivetable'></div>" ); 24}); 25 26/*GLOBAL VARIABLES*/ 27var menuToggleDataAttr = "data-text-swap"; 28var menuToggleCloseText = "Close Menu"; 29 30var mobileSearchWarpperClass = "sys_mobile-search"; 31var mobileSearchToggleClass = "sys_mobile-search-toggle"; 32 33$(function () { 34 35 /*Mobile Menu Toggle*/ 36 $(".sys_menu-toggle").each(function(){ 37 $(this).attr(menuToggleDataAttr, menuToggleCloseText); 38 $(this).click(function(){ 39 menuToggle($(this)); 40 }); 41 42 $(this).on('keypress', function(e) { 43 if(e.which == 13) { 44 menuToggle($(this)); 45 } 46 }) 47 48 }); 49 50 /*Colour Overlays*/ 51 $(".sys_imageWithHeading").hover(function(e){ 52 var overlayWidth = $(this).find("img").width() + "px"; 53 var overlayHeight = $(this).find("img").height() - $(this).find("h2").outerHeight() + "px"; 54 55 $(this).find("a::has(img)").append("<span class='sys_imageWithHeading-overlay' style='width: "+ overlayWidth +"; height: "+ overlayHeight +";'> </span>"); 56 },function(){ 57 $(this).find("a:has(img)").children().remove(".sys_imageWithHeading-overlay"); 58 }); 59 60 /*Course Detail HTML Fix*/ 61 //$(".sys_factfile").unwrap(); 62 //$(".sys_factfileUcas").unwrap(); 63 64 65 66 /*Make rotating banners responsive*/ 67 $(".sys_banner img:first-child").load(function(){ 68 setRotatingBannerHeight($(this)); 69 }); 70 71 72 73}); 74 75$(window).resize(function() { 76 setRotatingBannerHeight( $(".sys_banner img:first-child")); 77}); 78 79/*Functions*/ 80function menuToggle(element) { 81 var currentText = element.text(); 82 element.parent().find('ul ul').hide(); 83 element.parent().find("ul:eq(0)").slideToggle("fast"); 84 element.text(element.attr(menuToggleDataAttr)); 85 $(element).attr(menuToggleDataAttr, currentText); 86} 87 88function setRotatingBannerHeight(img){ 89 var imageHeight = img.height(); 90 $(".sys_banner").css("height", imageHeight); 91 92 93}
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.