Forums › Forums › Search & Filter Pro › Uncheck children checkbox
- This topic has 4 replies, 2 voices, and was last updated 7 years, 9 months ago by
Anonymous.
Viewing 5 posts - 1 through 5 (of 5 total)
-
Anonymous(Private) June 29, 2017 at 10:35 am #117626
Hi,
I was wondering if it’s possible to uncheck children if parent is unchecked.
It would concern a hierarchical custom taxonomy filter.Parent x <- unchecking this would uncheck all children.
– child
– child x
– child
– child xIf I try some jQuery* it only triggers on the first check but afterwards the jquery doesn’t trigger anymore.
Thanks in advance!
Anonymous(Private) July 14, 2017 at 10:06 pm #120689Hi, sorry for the late reply (forgot to enable email notifications), but I figured it out;
I was trying to ‘uncheck’ children checkboxes when parent is unchecked.jQuery(document).ready(function($) { $(document).on('click','.sf-level-0.sf-option-active .sf-label-checkbox:first', function() { $(this).parent().children().find('.sf-input-checkbox:checked').click(); }); $(document).on('click','.sf-level-1.sf-option-active .sf-label-checkbox:first', function() { $(this).parent().children().find('.sf-input-checkbox:checked').click(); }); });
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)