596fc95037302c318e3b5e3a18d447353fd5eda4
[yaffs-website] / web / core / modules / filter / filter.js
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
8 (function ($, Drupal) {
9   Drupal.behaviors.filterGuidelines = {
10     attach: function attach(context) {
11       function updateFilterGuidelines(event) {
12         var $this = $(event.target);
13         var value = $this.val();
14         $this.closest('.filter-wrapper').find('.filter-guidelines-item').hide().filter('.filter-guidelines-' + value).show();
15       }
16
17       $(context).find('.filter-guidelines').once('filter-guidelines').find(':header').hide().closest('.filter-wrapper').find('select.filter-list').on('change.filterGuidelines', updateFilterGuidelines).trigger('change.filterGuidelines');
18     }
19   };
20 })(jQuery, Drupal);