This is the output I have generated
This HTML code belongs to me
<td class="category" colspan ="2" id="tdcategory1">
<div id="category1" style="border:none !important; overflow:hidden; width:auto; height:auto">
</div>
</td>
My procedure involves creating a checkbox inside the id="tdcategory1" and creating multiple checkboxes inside the id="category1"
This is my JavaScript code
var div = $('#tdcategory1');
var input = $('<input />', { type: 'checkbox', name: "chkallcategory1", id: "chkallcategory1", value: 1, style: "cursor:pointer" });
input.appendTo(div);
$.each(data.Records, function (e, key, value) {
var div = $('#category1');
var input = $('<input />', { type: 'checkbox', name: cate_name, id: cate_name + '_' + key.id, value: key.id, style: "cursor:pointer" });
input.appendTo(div);
});
The issue I am facing is that the first checkbox I create is positioned at the bottom of the #category1 div