How do I get all checked-in checkbox values and switch to GET.
$("#subcategoria").click(function(){
var checados = [];
$.each($("input[name='subcategoria[]']:checked"), function(){
$.get("inc_habilidades.php",
{id:checados.push($(this).val()), opcao:'2'},
function(valor2){
$("#habilidades").html(valor2).chosen("destroy");
}
)
});
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><formaction="" method="">
<input class="subcategoria" type="checkbox" name="subcategoria[]" value="1" />teste1<br>
<input class="subcategoria" type="checkbox" name="subcategoria[]" value="2" />teste2<br>
<input class="subcategoria" type="checkbox" name="subcategoria[]" value="3" />teste3<br>
<input class="subcategoria" type="checkbox" name="subcategoria[]" value="4" />teste4
</form>