* Change /lib to /includes

* Move filter/action calls into actual functions file
* Rework mobile nav and header toggle behavior
This commit is contained in:
MickeyKay
2014-10-16 11:28:58 -07:00
parent 7c6032d742
commit b640458b00
13 changed files with 455 additions and 393 deletions
+40
View File
@@ -0,0 +1,40 @@
/**
* 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 */