1$(document).ready(function(){ 2 3var maxMobileSize = 768; // this value should match the media query 4var mobileAccordionTableSelector = ".table.mobile-accordion"; 5 6// Resize and Reorientation code borrowed and modified from this StackOverflow answer: 7// http://stackoverflow.com/a/6603537 8var previousOrientation = window.orientation; 9 10var checkOrientation = function() { 11 if(window.orientation !== previousOrientation){ 12 previousOrientation = window.orientation; 13 checkScreenSize(); 14 } 15}; 16 17var checkScreenSize = function() { 18 var width = $(window).width(); 19 20 if (width < maxMobileSize) { 21 handleMobile(); 22 } else { 23 handleDesktop(); 24 } 25} 26 27window.addEventListener("resize", checkScreenSize, false); 28window.addEventListener("orientationchange", checkOrientation, false); 29 30// Android doesn't always fire orientationChange on 180 degree turns 31setInterval(checkOrientation, 2000); 32 33 34function handleMobile() { 35 slideUpAllInactive(); 36} 37 38function handleDesktop() { 39 showRows(); 40} 41 42function showRows() { 43 $(mobileAccordionTableSelector + " .tr").each(function () { 44 $(this).removeAttr("style"); 45 }); 46} 47 48function slideUpAllInactive() { 49 $(".table .rh").not(".active").each(function() { 50 $(this).next().slideUp(); 51 }); 52} 53 54function handleMobileAccordionTableClick(rowHeader) { 55 var table = $(rowHeader).parents(".table"); 56 57 $(table).find(".rh").each(function () { 58 $(this).removeClass("active"); 59 }); 60 61 slideUpAllInactive(); 62 63 var nextRow = $(rowHeader).next(); 64 if (!nextRow.is(":visible")) { 65 $(rowHeader).addClass("active"); 66 nextRow.slideDown(); 67 } 68} 69 70$(mobileAccordionTableSelector + " .rh").click(function () { 71 handleMobileAccordionTableClick(this); 72}); 73 74// Need to run this on first load 75checkScreenSize(); 76 77})
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.