0
<div class="cast">
   <p id="addnew">
      <input type="text"><b id="add">ADD</b>
  </p>
</div>
$(document).ready(function(){
    $("#add").click(function(){
        $("#addnew").append("<p><input type=\"text\"><u id=\"del\">delete<u></p>");
    });
    $('#ab').click(function(){
       alert(); 
    });
});

I clicked #add. Append <p><input type=\"text\"><u id=\"del\">delete<u></p> later click #del. No function.

I have two ajax functions. Call PHP include html code

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339

1 Answers1

0

You should use on to bind your del click event :

$(document).on("click","#del", function(e) {
...
});

You can find the documentation on on here :http://api.jquery.com/on/

Quentin Roger
  • 6,410
  • 2
  • 23
  • 36