Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // set the correct checkbox on true (based on the which "Exposé" is asked for)
  2. var totalWhg = $('tbody > tr').length - $('.disabled').length - $('.reserved').length;
  3. var whgData = 0;
  4. $('.fancybox').on('click', function() {
  5.   whgData = $(this).closest('tr').data('whg');
  6.   for(var i = 1; i <= totalWhg; i++) {
  7.     $('#powermail_field_ichmoechteeinexposezufolgenderwohnung_' + i).prop('checked', false);
  8.   }
  9.   $('#powermail_field_ichmoechteeinexposezufolgenderwohnung_' + (whgData - totalWhg + 1)).prop('checked', true);
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement