1/* 2 * Tooltip script 3 * powered by jQuery (http://www.jquery.com) 4 * 5 * written by Alen Grakalic (http://cssglobe.com) 6 * 7 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery 8 * 9 */ 10 11 12 13this.tooltip = function(zone){ 14 // CONFIG // 15 xOffset = 10; 16 yOffset = 20; 17 // these 2 variable determine popup's distance from the cursor 18 // you might want to adjust to get the right result 19 // END CONFIG // 20 21 if (zone != '') 22 zone = zone + ' '; 23 24 25 /*************************/ 26 /* I T E M */ 27 /*************************/ 28 $(zone+"img.tooltip").hover = null; 29 $(zone+"img.tooltip").mousemove = null; 30 31 $(zone+"img.tooltip").hover(function(e){ 32 $("body #tooltip").remove(); // "body" indispensable, sinon seul le premier ID est retourné (jquery utilisant en interne getElementById) 33 $("body").append("<p id='tooltip'>"+ this.alt +"</p>"); 34 $("#tooltip") 35 .css("top",(e.pageY - xOffset) + "px") 36 .css("left",(e.pageX + yOffset) + "px") 37 .fadeIn("fast"); 38 }, 39 function(){ 40 $("#tooltip").remove(); 41 }); 42 $(zone+"img.tooltip").mousemove(function(e){ 43 $("#tooltip") 44 .css("top",(e.pageY - xOffset) + "px") 45 .css("left",(e.pageX + yOffset) + "px"); 46 }); 47 48 49 50 /*************************/ 51 /* E F F E C T */ 52 /*************************/ 53 $(zone+"img.tooltip_effects").hover = null; 54 $(zone+"img.tooltip_effects").mousemove = null; 55 56 $(zone+"img.tooltip_effects").hover(function(e){ 57 $("body #tooltip").remove(); // "body" indispensable, sinon seul le premier ID est retourné (jquery utilisant en interne getElementById) 58 $("body").append("<p id='tooltip_effects'>"+ this.alt +"</p>"); 59 $("#tooltip_effects") 60 .css("top",(e.pageY - xOffset) + "px") 61 .css("left",(e.pageX + yOffset) + "px") 62 .fadeIn("fast"); 63 }, 64 function(){ 65 //this.title = this.t; 66 $("#tooltip_effects").remove(); 67 }); 68 $(zone+"img.tooltip_effects").mousemove(function(e){ 69 $("#tooltip_effects") 70 .css("top",(e.pageY - xOffset) + "px") 71 .css("left",(e.pageX + yOffset) + "px"); 72 }); 73 74 75 /*************************/ 76 /* A C H I E V M E N T */ 77 /*************************/ 78 $(zone+"div.tooltip_achievement").hover = null; 79 $(zone+"div.tooltip_achievement").mousemove = null; 80 81 $(zone+"div.tooltip_achievement").hover(function(e){ 82 $("body #tooltip").remove(); // "body" indispensable, sinon seul le premier ID est retourné (jquery utilisant en interne getElementById) 83 $("body").append("<p id='tooltip_achievement'>"+ $(this).attr('data-tooltip') +"</p>"); 84 $("#tooltip_achievement") 85 .css("top",(e.pageY - xOffset) + "px") 86 .css("left",(e.pageX + yOffset) + "px") 87 .fadeIn("fast"); 88 }, 89 function(){ 90 $("#tooltip_achievement").remove(); 91 }); 92 $(zone+"div.tooltip_achievement").mousemove(function(e){ 93 $("#tooltip_achievement") 94 .css("top",(e.pageY - xOffset) + "px") 95 .css("left",(e.pageX + yOffset) + "px"); 96 }); 97 98 99 /*************************/ 100 /* A D V A N C E M E N T */ 101 /*************************/ 102 $(zone+"div.tooltip_advancement").hover = null; 103 $(zone+"div.tooltip_advancement").mousemove = null; 104 105 $(zone+"div.tooltip_advancement").hover(function(e){ 106 $("body #tooltip").remove(); // "body" indispensable, sinon seul le premier ID est retourné (jquery utilisant en interne getElementById) 107 $("body").append("<div id='tooltip_advancement'>"+ $(this).attr('data-tooltip') +"</div>"); 108 $("#tooltip_advancement") 109 .css("top",(e.pageY - xOffset) + "px") 110 .css("left",(e.pageX + yOffset) + "px") 111 .fadeIn("fast"); 112 }, 113 function(){ 114 $("#tooltip_advancement").remove(); 115 }); 116 $(zone+"div.tooltip_advancement").mousemove(function(e){ 117 $("#tooltip_advancement") 118 .css("top",(e.pageY - xOffset) + "px") 119 .css("left",(e.pageX + yOffset) + "px"); 120 }); 121 122}; 123 124function tagScroll() 125{ 126 $('[data-tag-idx]').each(function() 127 { 128 var idx = ($(this).data('tag-idx') + 1) % $(this).data('tag-count'); 129 $(this).data('tag-idx', idx); 130 $(this).toggle(idx == 0); 131 } 132 ); 133} 134 135// starting the script on page load 136$(document).ready(function(){ 137 tooltip(""); 138 139 // tags scrolling (multiples items) 140 if (typeof(window.tag_timer) == "undefined") 141 window.tag_timer = setInterval(tagScroll, 1000); 142 tagScroll(); 143});
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.