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
Post a Comment