Where am I going wrong on my form? When changing checkbox it needs to submit the form
HTML
<form id="form_onoff" name="form_onoff" action="onoff.php" method="post">
<input type="checkbox" value="on" id="slideThree" name="slideThree" />
<label for="slideThree"></label>
JQUERY
$(function($) {
$('input[type=checkbox][name=slideThree]').change(function() {
$("#form_onoff").submit(function() {
$.post('inc/onoff.php?id=<? echo $_SESSION['ids']; ?>', {slideThree: slideThree}, function(resposta) {
});
});
});
});
Thank you in advance