1var esec = { 2 speed: 500, 3 econe: true, //collapse other siblings, open one at one time 4 ecopenfirst: false, //open first at beginning 5 loadatready:true, 6 init:function() { 7 $(".esec>h3").on('click',function() { var ec=$(this).parent(); 8 var ct = $(this).next('div'); 9 if (ec.hasClass('open')) { //collapse 10 ct.slideUp(esec.speed); 11 } else { //expand 12 if (esec.econe) { 13 ec.siblings(".esec.open").removeClass('open').children("div").slideUp(esec.speed); 14 } 15 ct.slideDown(esec.speed, function() { 16 $("html").animate({ 17 scrollTop: ec.offset().top - $("header").outerHeight() 18 }, 200); 19 }); 20 } 21 ec.toggleClass('open'); 22 }); 23 if (this.ecopenfirst) { 24 $(".esec").each(function() { var pt = $(this).parent(); 25 var first = pt.children(".esec").eq(0); 26 if (!first.hasClass('open')) { 27 first.addClass('open').children('div').show(); 28 } 29 }); 30 } 31 } 32} 33 34var estab = { 35 speed: 300, 36 loadatready:true, 37 chgtab:function(i,tb) { var x=i+1; var td=tb.find("td").eq(i); 38 var cts = tb.next("div.estabcts"); 39 tb.attr('active',x).addClass('run'); 40 //chg tab 41 tb.find("td.active").removeClass('active'); 42 td.addClass('active'); 43 //chg mobile select 44 tb.prev("select.estabs-m")[0].selectedIndex=i; 45 //chg content 46 var cp = cts.children("section").eq(i); 47 var tp = cts.children("section.active"); 48 tp.fadeOut(estab.speed,function() { 49 cp.fadeIn(estab.speed,function() { 50 tp.removeClass('active'); 51 cp.addClass('active'); 52 tb.removeClass('run'); 53 }); 54 }); 55 }, 56 setmob:function(tb) { var h="<select class='estabs-m'>"; var i=0; 57 var a = parseInt(tb.attr('active')); 58 tb.find("td").each(function() { 59 var sel = (a==i+1)?" selected":""; 60 h+="<option value='"+i+"'"+sel+">"+$(this).html()+"</option>"; 61 }); 62 h+="</select>"; 63 tb.before(h); 64 tb.prev("select.estabs-m").on("change",function() { 65 estab.chgtab($(this)[0].selectedIndex,tb); 66 }); 67 }, 68 init:function() { 69 $(".estabs").each(function() { 70 var i = parseInt($(this).attr('active'))-1; 71 estab.setmob($(this)); 72 $(this).find('td').eq(i).addClass('active'); 73 $(this).next('.estabcts').children('section').eq(i).addClass('active'); 74 $(this).prev('select.estabs-m')[0].selectedIndex=i; 75 }); 76 $(".estabs td").on('click',function() { var tb = $(this).closest('table'); 77 var i = $(this).index(); var x = i+1; 78 if (tb.attr('active')!=x && !tb.hasClass('run')) estab.chgtab(i,tb); 79 }); 80 } 81} 82 83var spesec = { 84 speed: 500, 85 econe: true, //collapse other siblings, open one at one time 86 ecopenfirst: false, //open first at beginning 87 loadatready:true, 88 init:function() { console.log('init'); 89 $(".sp-esec-title").each(function() { 90 var ct = $(this).children(".expand"); 91 ct.hide(); 92 }); 93 $(".sp-esec-title").on('click',function() { var ec=$(this).parent(); 94 var ct = $(this).children('.expand'); 95 var tchild = $(this).children('p'); 96 if (ec.hasClass('open')) { //collapse 97 ct.slideUp(spesec.speed); 98 tchild.show(); 99 } else { //expand 100 if (spesec.econe) { 101 ec.siblings(".sp-esec-title.open").removeClass('open').children("div").slideUp(spesec.speed); 102 } 103 ct.slideDown(spesec.speed); 104 tchild.hide(); 105 } 106 ec.toggleClass('open'); 107 }); 108 if (this.ecopenfirst) { 109 $(".sp-esec").each(function() { var pt = $(this).parent(); 110 var first = pt.children(".sp-esec-blk").eq(0); 111 if (!first.hasClass('open')) { 112 first.addClass('open').children('div').show(); 113 } 114 }); 115 } 116 } 117} 118 119$(function() { 120 if (esec.loadatready) { esec.init(); }
121 if (estab.loadatready) { estab.init(); } 122 if (spesec.loadatready) { spesec.init(); } 123});
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.