View Full Version : change glossary helptip from onclick to onmouseover?
danno
03-04-2005, 06:27 AM
Is it possible to change the display of a glossary term to happen onmouseover instead of onclick? I couldn't find the file where I could make the change. If you can point me to the right file I can make the change.
Thanks,
Dan
danno
03-04-2005, 06:53 AM
Is it possible to change the display of a glossary term to happen onmouseover instead of onclick? I couldn't find the file where I could make the change. If you can point me to the right file I can make the change.
Thanks,
Dan
Nevermind. I found it in the /includes/classes/class.article.php file.
Now I just need a mod to close the helptip after it is open! I can create an onmouseout function that closes the helptip x seconds after the cursor leaves the link, but I would really like it to stay open for as long as the cursor is hovering over the content of the helptip itself. (like those contextual advertising systems you see everywhere... now you see where I am going with this ;) )
I'll post it in the code hack section if I figure it out.
Thanks,
Dan
danno
03-04-2005, 07:37 AM
Ok, so I'm a little over my head with this one. I got the helptip to open onmouseover instead of onclick. Now I just need it to either:
1. close after x seconds or
2. stay open as for as long as the cursor is over the content of the helptip, then close x seconds after the cursor leaves the content of the helptip
Option #2 would be similar to the contextual advertising used all over the web, like at http://www.experts-exchange.com/Web/Q_21299934.html (there are some heltips near the bottom of that page)
Any ideas out there?
Thanks,
Dan
Chris S
03-10-2005, 01:03 AM
Hey,
Add the following code to the javascript/helpTip.js file (under all the comments is fine, before function showHelpTip(...).)
function hideHelp(e) {
// find anchor element
var el = e.target || e.srcElement;
while (el.tagName != "A")
el = el.parentNode;
// is there already a tooltip? If so, remove it
if (el._helpTip) {
helpTipHandler.hideHelpTip(el);
}
}
Then, where you changed it to be a mouseover add:
onmouseout=\"hideHelp(event); return false;\"
and you're done....
Ok, so I'm a little over my head with this one. I got the helptip to open onmouseover instead of onclick. Now I just need it to either:
1. close after x seconds or
2. stay open as for as long as the cursor is over the content of the helptip, then close x seconds after the cursor leaves the content of the helptip
Option #2 would be similar to the contextual advertising used all over the web, like at http://www.experts-exchange.com/Web/Q_21299934.html (there are some heltips near the bottom of that page)
Any ideas out there?
Thanks,
Dan