filter.js 556 B

1234567891011121314151617181920
  1. (function ($) {
  2. /**
  3. * Automatically display the guidelines of the selected text format.
  4. */
  5. Drupal.behaviors.filterGuidelines = {
  6. attach: function (context) {
  7. $('.filter-guidelines', context).once('filter-guidelines')
  8. .find(':header').hide()
  9. .closest('.filter-wrapper').find('select.filter-list')
  10. .bind('change', function () {
  11. $(this).closest('.filter-wrapper')
  12. .find('.filter-guidelines-item').hide()
  13. .siblings('.filter-guidelines-' + this.value).show();
  14. })
  15. .change();
  16. }
  17. };
  18. })(jQuery);