In balloontip.js around line 112, comment out this highlighted line as shown in red:
Code:
function initalizetooltip(){
var all_links=document.getElementsByTagName("a")
if (enablearrowhead){
tiparrow=document.createElement("img")
tiparrow.setAttribute("src", arrowheadimg[0])
tiparrow.setAttribute("id", "arrowhead")
document.body.appendChild(tiparrow)
}
for (var i=0; i<all_links.length; i++){
if (reltoelement(all_links[i])){ //if link has "rel" defined and it's the ID of an element on page
all_links[i].onmouseover=function(e){
var evtobj=window.event? window.event : e
displayballoontip(this, evtobj)
}
//all_links[i].onmouseout=delayhidemenu
}
}
}
Now you are free to make your own close buttons right in the tip HTML, example:
Code:
<!--Sample balloon tooltip-->
<div id="balloon1" class="balloonstyle" style="width: 350px; background-color: lightyellow">
<a href="#" onclick="delayhidemenu(); return false;" title="Close">X</a><br>
Award winning JavaScript tutorials and over 400+ free scripts.
</div>
That's just an example, you may use an image, style it, get as fancy as you like. But you will have to do it for each tip.
One other thing to consider with this is that since delayhidemenu does delay the close a little so that mousing back over the link quickly will stop the tip from disappearing, you may want to set (at the beginning of balloontip.js):
Code:
//Rich HTML Balloon Tooltip: http://www.dynamicdrive.com/dynamicindex5/balloontooltip.htm
//Created: September 10th, 2006
var disappeardelay=0 //tooltip disappear delay (in miliseconds)
var verticaloffset=0 //vertical offset of tooltip from anchor link, if any
var enablearrowhead=1 //0 or 1, to disable or enable the arrow image
var arrowheadimg=["arrowdown.gif", "arrowup.gif"] //path to down and up arrow images
var arrowheadheight=11 //height of arrow image (amount to reveal)
/////No further editting needed
Bookmarks