Adding hover trigger from another div
Posted
by jakeprzespo
on Stack Overflow
See other posts from Stack Overflow
or by jakeprzespo
Published on 2010-05-19T14:00:48Z
Indexed on
2010/05/19
14:10 UTC
Read the original article
Hit count: 258
I am trying to activate the native hover effect of a div from another div. I understand that I could do this all in jQuery and add the styles in there, but would rather leave the native :hover
in the CSS. I'm just wondering if there is a way for this to work:
$("#div1").live("mouseenter", function() {
$("#div2").trigger("mouseenter");
});
I'd like to call it by doing something like this, but it isn't working. Is there really no way to trigger an event from another element's event?
Thanks in advance.
© Stack Overflow or respective owner