droctoganapus86
New Member
- Messages
- 49
- Reaction score
- 0
- Points
- 0
Hello, i have a slight problem with the jqury UI and some jquery code.
i have a couple of checkboxes, i want that when you click the first checkbox, the others are unchecked, and vica verca. I have this html :
and this piece of jquery:
this works fine, but when i call
it suddenly stops working. any ideas how to fix this?
i have a couple of checkboxes, i want that when you click the first checkbox, the others are unchecked, and vica verca. I have this html :
HTML:
<div class="buttonset">
<input name="all" id="all" type="checkbox" checked="checked" /><label for="all" title="All">All</label>
<input name="audio" id="audio" type="checkbox" /><label for="audio" title="Audio">Audio</label>
<input name="video" id="video" type="checkbox" /><label for="video" title="Video">Video</label>
<input name="apps" id="apps" type="checkbox" /><label for="apps" title="Programma's">Apps</label>
</div>
Code:
$(function(){
$('.pirate input[type="checkbox"]#all').click(function(){
$('.pirate input[type="checkbox"]:not(#all)').attr('checked', false);
});
$('.pirate input[type="checkbox"]:not(#all)').click(function(){
$('.pirate input[type="checkbox"]#all').attr('checked', false);
});
});
Code:
$('.buttonset').buttonset();
Last edited: