Mercurial > hg > cmmr2012-drupal-site
annotate themes/contrib/mayo/js/mayo.js @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@2 | 1 /** |
Chris@2 | 2 * @file |
Chris@2 | 3 * Provides the administration JavaScript for the Mayo theme settings page |
Chris@2 | 4 */ |
Chris@2 | 5 |
Chris@2 | 6 (function ($) { |
Chris@2 | 7 Drupal.behaviors.mayo = { |
Chris@2 | 8 attach : function(context, settings) { |
Chris@2 | 9 |
Chris@2 | 10 var base = $("#edit-base-font-family option:selected").val(); |
Chris@2 | 11 if (base == 2) $('#base-custom-font-family-wrapper').show(); |
Chris@2 | 12 else $('#base-custom-font-family-wrapper').hide(); |
Chris@2 | 13 |
Chris@2 | 14 var heading = $("#edit-heading-font-family option:selected").val(); |
Chris@2 | 15 if (heading == 2) $('#heading-custom-font-family-wrapper').show(); |
Chris@2 | 16 else $('#heading-custom-font-family-wrapper').hide(); |
Chris@2 | 17 |
Chris@2 | 18 $("#edit-base-font-family").change(function() { |
Chris@2 | 19 var sel = $(this).val(); |
Chris@2 | 20 if (sel == 2) $('#base-custom-font-family-wrapper').show(); |
Chris@2 | 21 else $('#base-custom-font-family-wrapper').hide(); |
Chris@2 | 22 }); |
Chris@2 | 23 |
Chris@2 | 24 $("#edit-heading-font-family").change(function() { |
Chris@2 | 25 var sel = $(this).val(); |
Chris@2 | 26 if (sel == 2) $('#heading-custom-font-family-wrapper').show(); |
Chris@2 | 27 else $('#heading-custom-font-family-wrapper').hide(); |
Chris@2 | 28 }); |
Chris@2 | 29 } |
Chris@2 | 30 }; |
Chris@2 | 31 })(jQuery); |