Created
July 17, 2025 13:36
-
-
Save cupertinobr/d2cb81e1c56718b1c17c31945703935e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| // Função para esconder os campos | |
| function esconderCampos() { | |
| var codiempr = document.getElementById('SC_codiempr').value; | |
| var codiempr = codiempr.charAt(0); | |
| if (codiempr > 0) { | |
| $('#SC_status_label').hide(); | |
| $('#id_hide_status').hide(); | |
| } else { | |
| $('#SC_status_label').show(); | |
| $('#id_hide_status').show(); | |
| } | |
| } | |
| // Observer para detectar mudanças no DOM | |
| var observer = new MutationObserver(function(mutations) { | |
| mutations.forEach(function(mutation) { | |
| if (mutation.type === 'childList') { | |
| esconderCampos(); | |
| } | |
| }); | |
| }); | |
| // Observar mudanças no body | |
| observer.observe(document.body, { | |
| childList: true, | |
| subtree: true | |
| }); | |
| $(document).ready(esconderCampos); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment