1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
(function ($) {
|
7
|
Drupal.behaviors.mayo = {
|
8
|
attach : function(context, settings) {
|
9
|
|
10
|
var base = $("#edit-base-font-family option:selected").val();
|
11
|
if (base == 2) $('#base-custom-font-family-wrapper').show();
|
12
|
else $('#base-custom-font-family-wrapper').hide();
|
13
|
|
14
|
var heading = $("#edit-heading-font-family option:selected").val();
|
15
|
if (heading == 2) $('#heading-custom-font-family-wrapper').show();
|
16
|
else $('#heading-custom-font-family-wrapper').hide();
|
17
|
|
18
|
$("#edit-base-font-family").change(function() {
|
19
|
var sel = $(this).val();
|
20
|
if (sel == 2) $('#base-custom-font-family-wrapper').show();
|
21
|
else $('#base-custom-font-family-wrapper').hide();
|
22
|
});
|
23
|
|
24
|
$("#edit-heading-font-family").change(function() {
|
25
|
var sel = $(this).val();
|
26
|
if (sel == 2) $('#heading-custom-font-family-wrapper').show();
|
27
|
else $('#heading-custom-font-family-wrapper').hide();
|
28
|
});
|
29
|
}
|
30
|
};
|
31
|
})(jQuery);
|