Skip to content

Instantly share code, notes, and snippets.

@dantetesta
Last active May 25, 2022 12:10
Show Gist options
  • Save dantetesta/dfd837c72604ddae13d096c877af076d to your computer and use it in GitHub Desktop.
Save dantetesta/dfd837c72604ddae13d096c877af076d to your computer and use it in GitHub Desktop.
/*BY: ASK JARVIS + DANTE TESTA */
<style>#uf-list,#htmlcode{ display: none; }</style>
<script>
/*
Script Desenvolvido por: Dante Testa com ajuda do ASK Jarvis gerador de scripts com inteligência artificial.
Data: 06/05/2022
*/
var estado = document.querySelectorAll('#dante-testa-map-svg .estado');
for (var i = 0; i < estado.length; i++) {
estado[i].addEventListener('click', function(e) {
e.preventDefault();
var name = this.getAttribute('name');
var radio = document.querySelectorAll('input[type=radio][name=_estado]');
for (var j = 0; j < radio.length; j++) {
if (radio[j].getAttribute('value') == name) {
radio[j].click();
/*alert(radio[j].value);*/
}
}
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment