Object.extend(Event, {
getRelatedTarget: function(event) {
var t = event.relatedTarget;
if (!t) {
if (event.type == 'mouseout') t = event.toElement;
else if (event.type == 'mouseover') t = event.fromElement;
}
return $(t);
}
});
I would highly suggest reading over this article on mouse events: http://www.quirksmode.org/js/events_mouse.html
Brandon
On 8/30/06, b83s <[EMAIL PROTECTED]> wrote:
Thanks allot Peter for The info,
I tryed it yesterday and it almost workes, when i mouseover the image
the div with text shows and stays there even when i hover over the div.
But when i mouseout of the image the div with tekst doesn't get
removed.
Could somebody give me some small explenaition about the function?
This is the code i used.
function disapearo(id){
e = e || window.event;
var target = e.srcElement || e.target ;
if (target != this) return;
var related = e.relatedTarget || e.toElement;
while (related != this && related.nodeName != 'BODY')
related = related.parentNode;
if (related == this) return;
id = 'imageinfo'+id;
Element.hide(id);
}
You can check out the page at:
Thanks,
Gijs
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---
