Open heyarny opened 8 years ago
Hi Arnold,
I think the best way to ensure cross browser compatibility would be to use the GQuery mouserover()
and mouseout()
functions.
$(testElem).mouseover(new Function() {
public boolean f(Event event, Object... obj) {
Element item = (Element) obj[0];
$(item).css("backgroundColor", "red");
return true;
}
})
.mouseout(new Function() {
public boolean f(Event event, Object... obj) {
Element item = (Element) obj[0];
$(item).css("backgroundColor", "white");
return true;
}
});
I tested it on Firefox 42. Let me know if the problem still persist.
@Elrhino thank you, but for your information:
public GQuery mouseenter(Function... f) {
if (f == null || f.length == 0) {
// handle trigger of mouseleave
return triggerHtmlEvent("mouseenter");
}
return bind("mouseenter", null, f);
}
So, there is no difference what way you use.
I'm using the latest maven of gwtquery. Firefox is up-to-date.
I noticed the mouse events are not passed to the parent element if there is a anchor element inside. This happens on firefox and with gwtquery only.
Works fine on Safari & Chrome
Example
There is something failing and I can't figure out the reason.