[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 /** 2 * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> 3 * @license GNU General Public License version 2 or later; see LICENSE.txt 4 */ 5 (() => { 6 7 const onChange = value => { 8 if (value === '-' || parseInt(value, 10) === 0) { 9 document.getElementById('menuselect-group').classList.add('hidden'); 10 } else { 11 document.getElementById('menuselect-group').classList.remove('hidden'); 12 } 13 }; 14 15 const onBoot = () => { 16 const element = document.getElementById('jform_assignment'); 17 18 if (element) { 19 // Initialise the state 20 onChange(element.value); // Check for changes in the state 21 22 element.addEventListener('change', ({ 23 target 24 }) => { 25 onChange(target.value); 26 }); 27 } 28 29 document.removeEventListener('DOMContentLoaded', onBoot); 30 }; 31 32 document.addEventListener('DOMContentLoaded', onBoot); 33 })();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |