Chris@2: /** Chris@2: * @file Chris@2: * Provides the administration JavaScript for the Mayo theme settings page Chris@2: */ Chris@2: Chris@2: (function ($) { Chris@2: Drupal.behaviors.mayo = { Chris@2: attach : function(context, settings) { Chris@2: Chris@2: var base = $("#edit-base-font-family option:selected").val(); Chris@2: if (base == 2) $('#base-custom-font-family-wrapper').show(); Chris@2: else $('#base-custom-font-family-wrapper').hide(); Chris@2: Chris@2: var heading = $("#edit-heading-font-family option:selected").val(); Chris@2: if (heading == 2) $('#heading-custom-font-family-wrapper').show(); Chris@2: else $('#heading-custom-font-family-wrapper').hide(); Chris@2: Chris@2: $("#edit-base-font-family").change(function() { Chris@2: var sel = $(this).val(); Chris@2: if (sel == 2) $('#base-custom-font-family-wrapper').show(); Chris@2: else $('#base-custom-font-family-wrapper').hide(); Chris@2: }); Chris@2: Chris@2: $("#edit-heading-font-family").change(function() { Chris@2: var sel = $(this).val(); Chris@2: if (sel == 2) $('#heading-custom-font-family-wrapper').show(); Chris@2: else $('#heading-custom-font-family-wrapper').hide(); Chris@2: }); Chris@2: } Chris@2: }; Chris@2: })(jQuery);