#6109 closed bug (duplicate)
Event rises at its binding in IE.
Reported by: | Lathe | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.2 |
Component: | event | Version: | 1.4.1 |
Keywords: | onclick bind | Cc: | |
Blocked by: | Blocking: |
Description
When I bind click event in onclick function, new event rises immediately, without element click. This bug or feature has placed in IE8, not in FireFox 3.5.7.
Exsample:
<a href="#" onclick="Test(this)">Test</a>
<script language="javascript">
function Test(element) {
This meessage must show all time.
alert("1");
var fn = function(event) {
This message must show only at second time, but in IE show all time. alert("2");
}; element.click(fn);
}
</script>
Change History (4)
comment:1 Changed 14 years ago by
comment:2 Changed 13 years ago by
Sudgestion: Dont use inline javacript ("onClick") on element just bind it in scripts $(element)
.bind('click', Test);
comment:3 Changed 13 years ago by
Priority: | → undecided |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Sorry, correct example: