So you do have javascript errors. The code should look like this:
if (this.rawValue == 1){
Table1.presence = "visible";
}else {
Table1.presence = "hidden"
}
Lets make it work with the checkbox 1st, then we can write a test for the addInstance (as you say).