The line
"<li> <input type="checkbox" > <label >Checkbox 1</label> </li>";
is not escaped properly with the embedded quotes around "checkbox". This causes the parser to fail during the definition of fun
. You can use single quotes
"<li> <input type='checkbox' > <label >Checkbox 1</label> </li>";
or escape the double quotes:
"<li> <input type=\"checkbox\" > <label >Checkbox 1</label> </li>";
or use single quotes to define the string:
'<li> <input type="checkbox" > <label >Checkbox 1</label> </li>';