I would remove the onclick="toggleState(2)" and try some jquery code similar to:
$('#checkbox2').on('change', function() {
console.log($(this).is(':checked'));
});
Also, you should change your label to <label for="checkbox2">
rather than <label for="checkbox3">
as an element with the id checkbox3 doesn't exist.
It would also help if you could mention what version of Foundation you are using.