Opened 12 years ago
Closed 12 years ago
#9947 closed bug (worksforme)
about jQuery(html, props)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I find a bug of Jquery(html,props). example: $("<div>", {
"class": "test", text: "Click me!", click: function(){
$(this).toggleClass("test");
}
}).appendTo("body");
"click" is wrong.I think this "onclick".
Note: See
TracTickets for help on using
tickets.
The example seems to work. If you are suggesting that we change "click" to "onclick" we can't do that without breaking existing user code.
http://jsfiddle.net/dmethvin/QFxCx/