'auto', 'relative' => true)); $script = " jQuery(document).ready(function() { menuHide(jQuery('#jform_assignment').val()); jQuery('#jform_assignment').change(function() { menuHide(jQuery(this).val()); }) }); function menuHide(val) { if (val == 0 || val == '-') { jQuery('#menuselect-group').hide(); } else { jQuery('#menuselect-group').show(); } } "; // Add the script to the document head JFactory::getDocument()->addScriptDeclaration($script); ?>