supose i have tr like this :
<tr id="file" >
<td width="510"><div align="right"><span class="star"> *</span>
<input type="text" name="title" style="width:500px;direction:ltr" />
</div></td>
<td width="156" nowrap="nowrap"><div align="right">file </div></td>
</tr>
and i have to link at bottom of page that let me do some action my js code is :
$(function(){
$(".add").click(function(e){
e.preventDefault();
var copy =$('#file').clone().removeAttr('id').insertBefore($('.submit')) ;
console.log('add called') ;
});
$('.remove').click(function(e){
e.preventDefault();
console.log('remove called ');
});
}) ;
if the user first input some text in first input i have the same text in copy , i want to clear input after i create copy . tanks