.click() overwrites existing onclick-attribute
Original author: [email protected] (May 18, 2012 15:35:37)
What steps will reproduce the problem?
HTML: <input id="button" type="button" value="button" onclick="alert('button');">
With .click() only the "gwtquery"-alert will appear:
$("#button").click(new Function() { @Override public boolean f(Event e) { Window.alert("gwtquery"); return true; } });
With .live() both alerts will appear:
$("#button").live("click", new Function() { @Override public boolean f(Event e) { Window.alert("gwtquery"); return true; } });
What version of the product are you using? On what operating system?
- Firefox ESR 10.0.4
- Latest gwtquery snapshot https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/gwtquery/gwtquery/1.1.1-SNAPSHOT/gwtquery-1.1.1-20120509.224331-18.jar
Original issue: http://code.google.com/p/gwtquery/issues/detail?id=137
From [email protected] on May 18, 2012 20:13:22 With .bind() only the "button"-alert will appear:
$("#button").bind("click", new Function() { @Override public boolean f(Event e) { Window.alert("gwtquery"); return true; } });
From [email protected] on May 20, 2012 20:26:55 Indeed, I mentioned that in issue #92
Julien, could you take a look to this?
ok