Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
Office.initialize = function (reason) {


$('#Button1').click(function (){
var counter = 0;

$("#message").prepend("

" + "<input type='checkbox' id='checkbox2' name='test1'/>" + document.getElementById("target").value) + "
";
counter++;

//$("#message").prepend("
" + "<input type='checkbox' id='checkbox2' name='test1' />" + document.getElementById("target").value) + "
";
document.getElementById("target").value = "";

$('#checkbox2').click(function () { del(); });

});
}

function del() {
while(this.checked){
""+document.getElementById("target")+"";
document.getElementById("checkbox2").value = "";
}
}


can any one please solve this ?
THank you
Posted
Comments
successft9 12-Apr-13 2:03am    
@SA i need to hide the checkbox and the data in it
i used $("#checkbox2").hide();
but how do i hide the data that is binded with the checkbox after i check the checkbox

1 solution

This is how to do it:
JavaScript
myCheckBox = $("#checkbox2"); // id selector

//...

if (myCheckBox.is(':checked'))
   //... do something


Good luck,
—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900