javascript - Copy row doesn't work other ajax function -


i create copy row jquery append function , use add , remove button , there jquery mask phone input inside first row of table.

phone mask working first row not working copy row.

    $(document).ready(function(){      var cnt = 2;      $(".addcf").click(function(){          $("#customfields").append('<tr><td><input type="text" name="adsoyad[]" style="width:130px"/></td><td><input type="text" name="gorevi[]" style="width:130px"/></td><td><input type="text" id="phone" name="telefon[]" style="width:130px"/></td><td><input type="text" name="dahili[]" style="width:70px"/></td> <td><input type="email" name="eposta[]" style="width:190px"/></td><td><a href="javascript:void(0);" class="remcf"><span class="btn">-</span></a></td></tr>');     cnt++;     });     $("#customfields").on('click','.remcf',function(){         if (confirm("silmek istediğinizden emin misiniz?"))         {         $(this).parent().parent().remove();         }     });      });     jquery(function($){     $("#phone").mask("(999) 999-9999");     }); 

http://jsfiddle.net/drxman/hqgenthu/2/

you have re-append phone mask after appending new row.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -