2
Hello guys my goal is to mark and uncheck checkboxs until then all right look at print:
I press to select all and the script selects ALL I click to uncheck it unchecks ALL until then all right.
The PROBLEM is that if I go with the mouse arrow and click on a checkbox of those and remove the selection and then click on select all of them ARE NOT SELECTED BY THE TOOL SELECT ALL THAT I CREATED. Do you understand?
Kind of:
1- I clicked on select all, now ta everyone selected as in the image.
2-I choose the first checkbox and clear.
3-Now I will click on select all.
4-The select all does not mark my 1 checkbox. Understands agr?
my script is this:
//AQUI É PRA SELECIONAR TODOS OS CHECKBOX AMIGOS O BOTÃO AZUL LA ENCIMA SELECIONAR TODOS
$('.selecionadinho').bind('click',function() {
$('.checkboxs').each( function() {
$(this).attr('checked',true);
}
);
});
//AQUI ESSE CODIGO VAI RETIRAR TODOS OS CHECKBOX AZUL LA ENCIMA RETIRAR SELEÇÃO DE TODOS
$('.retirar').bind('click',function() {
$('.checkboxs').each( function() {
$(this).attr('checked',false);
}
);
});
Thanks! Now the suggestion of your improvement not accepted for anyone few people would understand that there , much less me, I did not understand any of this part $(this). index() == 0 ? true : false;
– Programador Inteligente
A difficult little code costs much more than a big friend, but you helped me mt to since yesterday without knowing what to do.
– Programador Inteligente
valeuuuuuuuuuuuuuuuuuuuuuu
– Programador Inteligente
@Smart programmer I put an update on the answer that explains the code thing you didn’t understand. Abs!
– Sam
@Smart programmer If the answer was helpful and helped, please check ✔
– Sam