Skip to content
Loading
Click function is not working' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •   
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   ' ' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   ' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   ' +  
  •                   ' ' +  
  •                   ' +  
  •                   ' +  
  •                   '' +  
  •                   '' +  
  •                   ' +  
  •                   '' +  
  •   
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •                   '' +  
  •             
  •                   ' +  
  •                    '' +  
  •                       +Add ' +  
  •                   ' ' +  
  •                   ''  
  •               ' ';  
  •              
  •   
  •                   $("#yesDetailsDiv").empty();  
  •                   if ($("#yesDetailsDiv").is(':empty')) {  
  •                       $('#yesDetailsDiv').append(str);  
  •                   }  
  •   
  •                       });  
  •  
    The above code works fine. An ADD button is introduced to add extra details if the user needs.
    I need to display the same design if the user click add button, so i coded for this  
    1. $("#AddDetails").click(function () {  
    2.                         var str4 = "";  
    3.                         str4 = str4 +  
    4.                         '  ' +  
    5.                                     '' +  
    6.                                     '' +  
    7.   
    8.                                     '
    ' +  
  •                                     '
  • ' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                         '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •   
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     ' ' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     ' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     ' +  
  •                                     ' ' +  
  •                                     ' +  
  •                                     ' +  
  •                                     '' +  
  •                                     '' +  
  •                                     ' +  
  •                                     '' +  
  •   
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                                     '' +  
  •                             '';  
  •   
  •   
  •                         $("#yesDetailsDiv").append(str4);  
  •                     });  
  •      
     but here the click function is not working.   and i have tried 
    1. $('#AddDetails').live('click',function(){  
     and
    1. (document).on('click''#AddDetails'function () {  
     
    Why click function is not triggering here?
    how can i solve this? 

    5 Replies

    Know the answer? Post it — somebody with the same question will find it here.