I use of codeigniter.see you:example of my code please fill textbox and checked checkbox next clicked on link add, see yourself that not work .removeAttr('checked')
newDiv.find('input').each(function () { $(this).removeAttr('checked').val(''); });
full code:
$(document).ready(function () {
$(function () {
$('a.add').live('click', function (event) {
event.preventDefault();
var $class = '.' + $(this).closest('div.find_input').find('div').attr('class');
var newDiv = $(this).closest($class).clone();
$(this).closest($class).find('.adda').remove()
//$(this).find('.adda').remove()
//newDiv.append('<a href="" class="remove_input"></a>')
newDiv.find('input').each(function () {
$(this).removeAttr('checked').val('');
});
$($class + ':last').after(newDiv);
//newDiv.remove('.adda')
//alert(newDiv)
});
$('a.remove_input').live('click', function (event) {
event.preventDefault();
$(this).closest('div').remove();
});
});
});
With respect
You should be using the
propfunction, by doing this: