$("#all_checks").click(function (){
$("INPUT[type='checkbox']").attr('checked', $("#all_checks").is(':checked'));
});
mola no?
$("#all_checks").click(function (){
$("INPUT[type='checkbox']").attr('checked', $("#all_checks").is(':checked'));
});
mola no?
Octubre 19th, 2009 at 11:01 pm
Mañana te preparo la versión en Prototype y así voy conociendo ambos con mayor profundidad.
Octubre 20th, 2009 at 12:50 pm
En Prototype es:
$(’checks’).observe(’click’,function (e) {
$$(’#all input[type=checkbox]‘).each(function(e) { e.setValue($F(’checks’)); });
});
Octubre 20th, 2009 at 12:58 pm
Epa!
Creo que en jquery también se puede hacer con un each.
Muchas gracias!!, viene muy bien saber como se hace en otra alternativa :)
Noviembre 7th, 2009 at 8:46 pm
[...] Seleccionar todos los checkboxes de una página con JQuery, por Asier Marqués. [...]