Side navigation
#10927 closed bug (invalid)
Opened November 30, 2011 10:04AM UTC
Closed November 30, 2011 07:10PM UTC
on is not replacing live properly
Reported by: | Sap | Owned by: | Sap |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$(document).ready(function(){
$(document).on("click", function(){
if($("#fucsr").attr("id")!="fucsr") {
$('body').append("<input type='text' id='fucsr' name='fucsr' value=''/>");
}
$("#fucsr").focus();
});
$("#fucsr").on("click", function(){
alert("clicked");
});
});
/*
- This example is working with live but not with on
*/
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.