Hola,
Tengo este código y no sé porq no funciona . t-t
Código jquery:
Ver original$(document
).
ready(function(){
$("#checkbox_comprobar").
click(function() { var receive_info =[];
$("#checkbox").
each(function() {
if( $("#checkbox").is(':checked')){
receive_info.
push($("#checkbox").
val()); alert(receive_info[0]);
}
});
});
$("#checkbox_activar").
click(function() { $("#checkbox").
attr('checked', true); });
$("#checkbox_desactivar").
click(function() { $("#checkbox").
attr('checked', false); });
});
Código html.
Código HTML:
Ver original<input name="checkbox" id="checkbox" type="checkbox" value="putamadre" /> <input name="checkbox" id="checkbox" type="checkbox" value="putamadre2" /> <input name="checkbox" id="checkbox" type="checkbox" value="putamadre3" />
<input name="checkbox_comprobar" id="checkbox_comprobar" type="button" value="putamdre" /> <input name="checkbox_activar" id="checkbox_activar" type="button" value="Activar" /> <input name="checkbox_desactivar" id="checkbox_desactivar" type="button" value="Desactivar" />
gracias de antemano, disculpar el lenguaje del código esq me divierte usar tacos xd