Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).load(function(){
- $('input').change(function(){
- var allchecked=0;
- $('input').each(function(){
- var checked;
- if (checked = $(this).attr('checked')) {allchecked++};
- var numberofrooms = $('li[data-test='+$(this).data('test')+']');
- checked ? numberofrooms.show('slow'): numberofrooms.hide('slow');
- });
- if(allchecked==0){$('li').show('slow');}
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement