clone - Reset val of new tr created using javascript -


i new javascript , stuck, need help!

by using javascript copying tr using clone method. fine when new tr created takes val copied first tr, want reset val of new tr. here script

function addtr(){     var newelement = $("#bills > tr").first().clone();     newelement.removeclass("hide").appendto("#bills").find("input[type='text']").val("");     newelement.find(".amount").val("");     newelement.find(".amount_span").html("");      registeronchange(); 

after changing val update table, work

> function addtr() { >         var newelement = $("#bills > tr").first().clone(); >         newelement.find(".amount").val(""); >         newelement.find(".amount_span").html(""); >         newelement.removeclass("hide").appendto("#bills").find("input[type='text']").val(""); >         registeronchange(); >     } 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -