mirror of
https://github.com/KevinMidboe/rohnenedre.git
synced 2025-12-08 20:39:02 +00:00
Initial commit. State 04.2021.
This commit is contained in:
27
wp-content/themes/Divi/js/admin_post_settings.js
Normal file
27
wp-content/themes/Divi/js/admin_post_settings.js
Normal file
@@ -0,0 +1,27 @@
|
||||
(function($){
|
||||
$(document).ready(function() {
|
||||
var $post_format = $('input[name="post_format"]'),
|
||||
$settings = $('.et_divi_format_setting'),
|
||||
$use_bg_color_setting = $('#et_post_use_bg_color');
|
||||
|
||||
$('.color-picker-hex').wpColorPicker();
|
||||
|
||||
$post_format.change( function() {
|
||||
var $this = $(this);
|
||||
|
||||
$settings.hide();
|
||||
|
||||
$( '.et_divi_format_setting' + '.et_divi_' + $this.val() + '_settings' ).show();
|
||||
|
||||
$use_bg_color_setting.trigger( 'change' );
|
||||
} );
|
||||
|
||||
$use_bg_color_setting.change( function() {
|
||||
var $this = $(this);
|
||||
|
||||
$( '.et_post_bg_color_setting' ).toggle( $this.is(':checked') );
|
||||
} );
|
||||
|
||||
$post_format.filter(':checked').trigger( 'change' );
|
||||
});
|
||||
})(jQuery)
|
||||
Reference in New Issue
Block a user