1var qTipTag = "a,label,input,img,textarea"; //Which tag do you want to qTip-ize? Keep it lowercase!// 2var qTipX = 0; //This is qTip's X offset// 3var qTipY = 15; //This is qTip's Y offset// 4 5//There's No need to edit anything below this line// 6tooltip = { 7 name : "qTip", 8 offsetX : qTipX, 9 offsetY : qTipY, 10 tip : null 11} 12 13tooltip.init = function () { 14 var tipNameSpaceURI = "http://www.w3.org/1999/xhtml"; 15 if(!tipContainerID){ var tipContainerID = "qTip";} 16 var tipContainer = document.getElementById(tipContainerID); 17 18 if(!tipContainer) { 19 tipContainer = document.createElementNS ? document.createElementNS(tipNameSpaceURI, "div") : document.createElement("div"); 20 tipContainer.setAttribute("id", tipContainerID); 21 document.getElementsByTagName("body").item(0).appendChild(tipContainer); 22 } 23 24 if (!document.getElementById) return; 25 this.tip = document.getElementById (this.name); 26 if (this.tip) document.onmousemove = function (evt) {tooltip.move (evt)}; 27 28 var a, sTitle, elements; 29 30 var elementList = qTipTag.split(","); 31 for(var j = 0; j < elementList.length; j++) 32 { 33 elements = document.getElementsByTagName(elementList[j]); 34 if(elements) 35 { 36 for (var i = 0; i < elements.length; i ++) 37 { 38 a = elements[i]; 39 sTitle = a.getAttribute("title"); 40 if(sTitle) 41 { 42 a.setAttribute("tiptitle", sTitle); 43 a.removeAttribute("title"); 44 a.removeAttribute("alt"); 45 a.onmouseover = function() {tooltip.show(this.getAttribute('tiptitle'))}; 46 a.onmouseout = function() {tooltip.hide()}; 47 } 48 } 49 } 50 } 51} 52 53tooltip.move = function (evt) { 54 var x=0, y=0; 55 if (document.all) {//IE 56 x = (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft; 57 y = (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop; 58 x += window.event.clientX; 59 y += window.event.clientY; 60 61 } else {//Good Browsers 62 x = evt.pageX; 63 y = evt.pageY; 64 } 65 this.tip.style.left = (x + this.offsetX) + "px"; 66 this.tip.style.top = (y + this.offsetY) + "px"; 67} 68 69tooltip.show = function (text) { 70 if (!this.tip) return; 71 this.tip.innerHTML = text; 72 this.tip.style.display = "block"; 73} 74 75tooltip.hide = function () { 76 if (!this.tip) return; 77 this.tip.innerHTML = ""; 78 this.tip.style.display = "none"; 79} 80 81window.onload = function () { 82 tooltip.init (); 83}
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.