From adb30a1214d95ffb86af79dfd0ae3b9fb14dd2be Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 26 Jun 2025 14:27:33 -0700 Subject: [PATCH] docs: update fillAvailableHeight example for jQuery usage - Modified the documentation comment for the fillAvailableHeight function in BodyInlineJS.php to specify that it must be used within a jQuery ready function. - Ensured clarity in the example usage to improve developer understanding and implementation. --- .../include/DefaultPageLayout/BodyInlineJS.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php b/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php index 6e3ff6584..48e4a49d8 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php @@ -475,12 +475,15 @@ function nchanFocusStop(banner=true) { * * @example * // Custom configuration with additional elements - * fillAvailableHeight({ - * targetElementSelector: '.my-content', - * elementSelectorsForHeight: ['.my-controls', '.my-actions'], - * elementSelectorsForSpacing: ['.my-content'], - * minHeight: 500, - * manualSpacingOffset: 20 + * // MUST BE USED IN JQUERY ON READY + * $(function() { // or $(document).ready(function() { + * fillAvailableHeight({ + * targetElementSelector: '.my-content', + * elementSelectorsForHeight: ['.my-controls', '.my-actions'], + * elementSelectorsForSpacing: ['.my-content'], + * minHeight: 500, + * manualSpacingOffset: 20 + * }); * }); */ function fillAvailableHeight(params = { // default params