1$(function(){ 2 //$('.to_combo_box').to_combo_box(); 3 4 5 function n() { 6 $("#body .body_post_reference").each(function (){ 7 // console.log('estoy en funcion'); 8 var a = $(this).find('.postInfo_relative').offset().top - 10, // coordenada top relativo al documento 9 b = $(this).outerHeight(), // altura total 10 d = $(window).scrollTop(), // posicion del scroll 11 p = $(this).find(".postInfo").outerHeight(true), // altura del sidebar flotante 12 q = $(this).find(".postInfo").offset().left; // coordenada izquierda relativo al document 13 qq = q+15; 14 lf = 'auto'; 15 // console.log(a +' / '+ b +' / '+ d +' / '+ p +' / '+ q); 16 // console.log(q + '/' + qq); 17 18 // si la coordenada top del contenedor menos la posicion del scroll es menor que cero 19 // Y 20 // La coordenada top del contenedor menos la posición del scroll es mayor que la posicion del scroll 21 // Y 22 // la coordenada top del contenedor menos la posicion del scroll es mayor que 10 (padding) + la altura del sidebar menos la altura total del contenedor 23 24 if (a - d < 0 && a - d > -b && a - d < 10 + p - b) 25 { 26 // console.log('a'); 27 $(this).find(".postInfo").data("fixed", "false").css({ 28 position: "absolute", 29 right: "0", 30 bottom: "10px", 31 top: "auto" 32 }); 33 } 34 else 35 { 36 // console.log('segundo caso'); 37 if(a - d < 0 && a - d > -b) 38 { 39 lf = qq; 40 // console.log('tercer caso'); 41 $(this).find(".postInfo").data("fixed", "true").css({ 42 position: "fixed", 43 bottom: "auto", 44 top: "10px" 45 }) ; 46 }else{ 47 // console.log('cuarto caso'); 48 $(this).find(".postInfo").data("fixed", "false").css({ 49 position: "absolute", 50 right: "0", 51 bottom: "auto", 52 top: "0px" 53 }); 54 } 55 } 56 // console.log($('.postInfo').data()); 57 if ($(this).find(".postInfo").data("fixed") == "true") 58 { 59 // console.log('quinto caso'); 60 a = $(this).offset().left + $(this).find(".entry").outerWidth(false) - $(window).scrollLeft(); 61 var lf = a+o+15; 62 63 /*$(this).find(".postInfo").css({ 64 left: lf + "px" 65 }); 66 console.log($(window).scrollLeft() + " and " + a);*/ 67 } 68 69 $(this).find(".postInfo").css({ 70 left:lf 71 }); 72 }) 73 } 74 75 n(); 76 $(window).scroll(function () { 77 n() 78 }); 79 80 var o = 16; 81 $(window).resize(function () { 82 83 $("#body .postInfo").each(function () { 84 if ($(this).find(".postInfo").data("fixed") == "true") { 85 var a = $(this).offset().left + $(this).find(".left_container").outerWidth(false) + $(window).scrollLeft(); 86 $(this).find(".postInfo").css({ 87 left: a + o + "px" 88 }); 89 // console.log($(window).scrollLeft() + " and " + a) 90 } 91 }) 92 }); 93 94 /*$(window).resize(function () { 95 $("#content .tag-post").each(function () { 96 if ($(this).find(".postInfo").data("fixed") == "true") { 97 var a = $(this).offset().left + $(this).find(".entry").outerWidth(false) - $(window).scrollLeft(); 98 $(this).find(".postInfo").css({ 99 left: a + o + "px" 100 }); 101 console.log($(window).scrollLeft() + " and " + a) 102 } 103 }) 104 });*/ 105 106});
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.