Mercurial > hg > cmmr2012-drupal-site
diff themes/contrib/mayo/js/mayo.js @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/themes/contrib/mayo/js/mayo.js Tue Jul 10 13:19:18 2018 +0000 @@ -0,0 +1,31 @@ +/** + * @file + * Provides the administration JavaScript for the Mayo theme settings page + */ + +(function ($) { + Drupal.behaviors.mayo = { + attach : function(context, settings) { + + var base = $("#edit-base-font-family option:selected").val(); + if (base == 2) $('#base-custom-font-family-wrapper').show(); + else $('#base-custom-font-family-wrapper').hide(); + + var heading = $("#edit-heading-font-family option:selected").val(); + if (heading == 2) $('#heading-custom-font-family-wrapper').show(); + else $('#heading-custom-font-family-wrapper').hide(); + + $("#edit-base-font-family").change(function() { + var sel = $(this).val(); + if (sel == 2) $('#base-custom-font-family-wrapper').show(); + else $('#base-custom-font-family-wrapper').hide(); + }); + + $("#edit-heading-font-family").change(function() { + var sel = $(this).val(); + if (sel == 2) $('#heading-custom-font-family-wrapper').show(); + else $('#heading-custom-font-family-wrapper').hide(); + }); + } + }; +})(jQuery);