1var fixedSidebar = {}; 2 3$(function(){ 4 "use strict"; 5 6 // å³ã«ã©ã è¿½å¾ 7 fixedSidebar = (function(){ 8 var w = $(window); 9 10 var contentsWrap = $("#contentsWrap"); 11 var main = $("#main"); 12 var sub = $("#sub"); 13 14 var margin = 36; 15 var top = 0; 16 17 var sub_offset = 0; 18 var stop_height = 0; 19 20 var init = function(){ 21 w.load(function(){ 22 if(main.outerHeight() > sub.outerHeight()){ 23 sub_offset = sub.offset(); 24 stop_height = (contentsWrap.offset().top + contentsWrap.outerHeight()) - sub.outerHeight() - margin; 25 26 sub.css({ 27 "position": "fixed", 28 "top": sub_offset.top, 29 "right": "auto", 30 "margin-left": 640 31 }); 32 33 w.scroll(function(){ 34 restart(); 35 }); 36 37 w.resize(function(){ 38 restart(); 39 }); 40 41 fixed(); 42 } 43 }); 44 } 45 46 var restart = function(){ 47 if(main.outerHeight() > sub.outerHeight()){ 48 stop_height = (contentsWrap.offset().top + contentsWrap.outerHeight()) - sub.outerHeight() - margin; 49 fixed(); 50 } 51 } 52 53 var fixed = function(){ 54 var st = w.scrollTop(); 55 if(st >= (sub_offset.top - margin)){ 56 if(st >= stop_height){ 57 top = margin - (st - stop_height); 58 sub.css({ 59 "top": top, 60 }); 61 }else{ 62 if(top !== margin){ 63 sub.css({ 64 "top": margin, 65 }); 66 } 67 } 68 }else{ 69 top = sub_offset.top - st; 70 sub.css({ 71 "top": top, 72 }); 73 } 74 } 75 76 if(sub.length > 0){ 77 init(); 78 } 79 80 return { 81 restart: restart 82 }; 83 }()); 84}); 85 86 87$(function(){ 88 $('#accordion dt:eq(0)').addClass('active'); 89 $('#accordion dt:eq(0) span').text('-'); 90 $('#accordion dd:eq(0)').show(); 91 $('#accordion dt').click(function(){ 92 //$('#accordion dd').slideUp(); 93 $(this).toggleClass('active'); 94 $(this).next().slideToggle(); 95 if($(this).hasClass('active')){ 96 $(this).children().text('-'); 97 }else{ 98 $(this).children().text('+'); 99 } 100 }); 101});
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.