mirror of
https://github.com/10h30/trestle.git
synced 2026-06-05 15:09:35 +09:00
b640458b00
* Move filter/action calls into actual functions file * Rework mobile nav and header toggle behavior
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
/**
|
|
* jQuery that runs in the WordPress admin
|
|
*
|
|
* @since 1.0.0
|
|
*
|
|
* @package Trestle
|
|
*/
|
|
|
|
// Executes when the document is ready
|
|
jQuery(document).ready(function() {
|
|
|
|
// Hide Trestle layout radio buttons
|
|
jQuery('.trestle-layout img').next('input[type="radio"]').hide();
|
|
|
|
// Add radio button functionality to layout icons
|
|
jQuery('.trestle-layout img').click(function() {
|
|
jQuery(this).next('input[type="radio"]').attr('checked', true);
|
|
jQuery('.trestle-layout img').removeClass('checked');
|
|
jQuery(this).addClass('checked');
|
|
});
|
|
|
|
// Add drop-down functionality for Post Info & Meta options
|
|
if( ! jQuery('#genesis-settings\\[trestle_manual_post_info_meta\\]').is(':checked') ) {
|
|
jQuery('.trestle-post-info-meta').hide();
|
|
}
|
|
|
|
jQuery('#genesis-settings\\[trestle_manual_post_info_meta\\]').change(function() {
|
|
jQuery('.trestle-post-info-meta').slideToggle();
|
|
});
|
|
|
|
// Add drop-down functionality for equal height breakpoint
|
|
if( ! jQuery('#genesis-settings\\[trestle_equal_height_cols\\]').is(':checked') ) {
|
|
jQuery('.trestle-equal-columns-breakpoint').hide();
|
|
}
|
|
|
|
jQuery('#genesis-settings\\[trestle_equal_height_cols\\]').change(function() {
|
|
jQuery('.trestle-equal-columns-breakpoint').slideToggle();
|
|
});
|
|
|
|
}); /* end of as page load scripts */
|