filter.js 762 B

1234567891011121314151617181920
  1. /**
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/2815083
  5. * @preserve
  6. **/
  7. (function ($, Drupal) {
  8. Drupal.behaviors.filterGuidelines = {
  9. attach: function attach(context) {
  10. function updateFilterGuidelines(event) {
  11. var $this = $(event.target);
  12. var value = $this.val();
  13. $this.closest('.filter-wrapper').find('.filter-guidelines-item').hide().filter('.filter-guidelines-' + value).show();
  14. }
  15. $(context).find('.filter-guidelines').once('filter-guidelines').find(':header').hide().closest('.filter-wrapper').find('select.filter-list').on('change.filterGuidelines', updateFilterGuidelines).trigger('change.filterGuidelines');
  16. }
  17. };
  18. })(jQuery, Drupal);