Advertisement
Guest User

Untitled

a guest
May 16th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $(window).load(function(){
  2. $('input').change(function(){
  3. var allchecked=0;
  4. $('input').each(function(){
  5. var checked;
  6. if (checked = $(this).attr('checked')) {allchecked++};
  7. var numberofrooms = $('li[data-test='+$(this).data('test')+']');
  8. checked ? numberofrooms.show('slow'): numberofrooms.hide('slow');
  9. });
  10. if(allchecked==0){$('li').show('slow');}
  11. });
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement