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.
This commit is contained in:
Zack Spear
2025-06-26 14:27:33 -07:00
parent 006344c646
commit adb30a1214

View File

@@ -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