I have the following doubt, I am based on this example to create my own filter with checkboxes, but I do not know in what way I can add the checkbox that shows all my messages and that when another checkbox is pressed, it will be removed the cheked to the checkbox of "All"
This is the HTML on which I am based:
<div class="tags">
<label>
<input type="checkbox" rel="todos" />
Todos
</label>
<label>
<input type="checkbox" rel="arts" />
Arts
</label>
<label>
<input type="checkbox" rel="computers" />
Computers
</label>
<label>
<input type="checkbox" rel="health" />
Health
</label>
<label>
<input type="checkbox" rel="video-games" />
Video Games
</label>
</div>
<ul class="results">
<li class="arts computers">Result 1</li>
<li class="video-games">Result 2</li>
<li class="computers health video-games">Result 3</li>
<li class="arts video-games">Result 4</li>
</ul>
and this is the JQuery
$(document).ready(function () {
$('.results > li').hide();
$('div.tags').find('input:checkbox').live('click', function () {
$('.results > li').hide();
$('div.tags').find('input:checked').each(function () {
$('.results > li.' + $(this).attr('rel')).show();
});
});
});
I hope you can help me