How to add CheckBox Name to Div control when Check box Checked status true through Jquery
I've tried the below code. but not get the result.
ASP CODE:
<div align="center" id="chkBoxes">
<asp:CheckBox ID="chbIceCream" Text ="Ice Cream" runat="server" />
<asp:CheckBox ID="chbCake" Text ="Cake" runat="server" />
<asp:CheckBox ID="chbChocolet" Text ="Cho colet" runat="server" />
</div>
<div id="ContentDiv">
</div>
Jquery CODE:
$(document).ready(function () {
$('#chbIceCream').click(function () {
debugger;
var Text = $('#chbIceCream').text();
if ($(this).attr('checked'))
$('#ContentDiv').append(Text);
});
});
If any one help in that please .