1jQuery(function($){ 2 3 function conf_fix_box(name, wrapper) 4 { 5 try { 6 var fix_box = $(name); 7 var main_bottom = $(wrapper).offset().top + $(wrapper).height(); 8 9 /* 10 name : ç§»åãããããã¯ã¹ã®jQueryã»ã¬ã¯ã¿ããã ã²ã¨ã¤ãæå®ã§ãããã¨ãæ¡ä»¶ã 11 start : ç§»åæä¸éã®TOPãabsoluteãªå¤ã 12 offset : 追尾ä¸ã®ä½ç½®ã®TOPãfixãªå¤ã 13 stop : 忢ä½ç½®ãabsoluteãªå¤ã 14 */ 15 16 return { 17 name: name, 18 start: fix_box.offset().top, 19 offset: 20, 20 stop: main_bottom - fix_box.height() 21 }; 22 } 23 catch(e) { 24 return null; 25 } 26 } 27 28 function initialize($, obj){ 29 var name = obj.name || "#floatMenu"; 30 var start = obj.start || 100; 31 var stop = obj.stop || 700; 32 var offset = obj.offset || 20; 33 34 var x = $(':has(' + name + ')').filter(function(){ return($(this).css('position') == 'relative')}); 35 var adjust = (x.length > 0 ? x.offset().top : 0); 36 37 $(window).scroll(function () { 38 var windowTop = $(window).scrollTop(); 39 40 if($(window).width() < 480) 41 $(name).css("position", "static").css("top", (start - adjust) + "px"); 42 else if(windowTop < (start - offset)) 43 $(name).css("position", "static").css("top", (start - adjust) + "px"); 44 else if(windowTop >= (stop - offset)) 45 $(name).css("position", "absolute").css("top", (stop - adjust) + "px"); 46 else 47 $(name).css("position", "fixed").css("top", offset + "px"); 48 }); 49 }; 50 51 var ary = []; 52 53 ary.pushUnlessNull = function (itm) 54 { 55 if(itm != null) 56 this.push(itm); 57 return this; 58 } 59 60 ary.pushUnlessNull(conf_fix_box("#fix_box1", '#main_contents')) 61 .pushUnlessNull(conf_fix_box("#fix_box2", '#main_contents')); 62 for(i = 0; i < ary.length; i++) 63 initialize($, ary[i]); 64});
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.