Hello Stack Overflow i hope you are well today,
I have this code:
$('.add_child').click(function(){
var attrName = $(this).attr('name');
var count = $(this).attr('count');
$(this).attr('count', (parseInt(count)+1))
var input = $('<input />');
input.attr('type','text')
input.attr('name',attrName+"["+count+"]" )
$('.children_form').append('<li>'+[input]+'</li>');
})
i am trying to get my out to display as:
<li><input /></li>
But it doesn't seem to work properly i am getting this code in my HTML
<li>[object Object]</li>
I believe this line is giving me the issue:
$('.children_form').append('<li>'+[input]+'</li>');
[and]) from around theinputin that final line?