Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Tooltips script [strange problem]

Reply
Thread Tools

Tooltips script [strange problem]

 
 
Mario
Guest
Posts: n/a
 
      05-04-2005
OK, I found solution (I've displaced part of one line):
[similar problem is occuring while we using the background-color in
a:hover style - don't use it ]

/*

Tooltips script v.1.0

Copyrights (c) 2005 Mariusz 'Vir' Grabczynski

free for non-commercial use

[please leave this comment intact]



Parametrs (in 'title' attributes):

| - new line [should be placed directly after words - whithout space]

*/

onload=function(d,b,a,i,nD,nDe,tV,e)
{
d=document;b=d.body;a=b.getElementsByTagName('a');
for(i=0;i<a.length;i++)
{
if(a[i].title)
{
nD=d.createElement('div');nD.className='tooltip';n D.id='tooltip';
a[i].onmouseover=function()
{
b.appendChild(nD);
tV=this.title;
nD.innerHTML=this.title.replace(/\|/g,"<br />");
this.title='';
}
a[i].onmousemove=function()
{
if(nDe=d.getElementById('tooltip'))
{
e=e||event;
with(nDe.style){left=e.clientX+b.scrollLeft+'px';t op=e.clientY+b.scrollTop+'px';}
}
}
a[i].onmouseout=function()
{
t=d.getElementById('tooltip');
(nDe=t)?b.removeChild(nDe):'';
this.title=tV;
}
}
}
}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ToolTips and Tables -- how can I have tooltips on the cells of a column? Frank HTML 2 12-07-2006 10:05 PM
ANN: SPE 0.8.1.b IDE (realtime error underlining & script tooltips) SPE - Stani's Python Editor Python 1 12-21-2005 08:39 PM
Tooltips script [strange problem] Mario Javascript 14 05-06-2005 08:57 PM
Tooltips script [strange problem] Mario Javascript 0 05-04-2005 09:16 PM
Tooltips on datagrid titles Stevie_mac ASP .Net 2 07-25-2003 01:26 PM



Advertisments