3 * Attaches behavior for the Filter module.
9 function updateFilterHelpLink () {
10 var $link = $(this).parents('.filter-wrapper').find('.filter-help > a');
11 var originalLink = $link.data('originalLink');
13 originalLink = $link.attr('href');
14 $link.data('originalLink', originalLink);
16 $link.attr('href', originalLink + '/' + $(this).find(':selected').val());
19 $(document).on('change', '.filter-wrapper select.filter-list', updateFilterHelpLink);
22 * Displays the guidelines of the selected text format automatically.
24 * @type {Drupal~behavior}
26 * @prop {Drupal~behaviorAttach} attach
27 * Attaches behavior for updating filter guidelines.
29 Drupal.behaviors.filterGuidelines = {
30 attach: function (context) {
31 $(context).find('.filter-wrapper select.filter-list').once('filter-list').each(updateFilterHelpLink);