Last active
November 23, 2023 16:45
-
-
Save dantetesta/a5795c99b4f96a10807b41b3cad94289 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
| /*BY: ASK JARVIS + DANTE TESTA */ | |
| /* | |
| Coloque o name id do campo a ser copiado = conteudo | |
| */ | |
| <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> | |
| <script> | |
| jQuery(document).ready(function(){ | |
| var btn = jQuery('.elementor-field-group button').attr('type', 'button'); | |
| var conteudo = '#form-field-conteudo'; | |
| /*FUNÇÃO QUE COPIA*/ | |
| jQuery(btn).click(function(){ | |
| jQuery(conteudo).select(); | |
| document.execCommand('copy'); | |
| jQuery(this).text('Copiado!'); | |
| jQuery(this).css('background-color','black'); | |
| jQuery(this).css('color','white'); | |
| setTimeout(function(){ | |
| jQuery(btn).text('Copiar'); | |
| jQuery(btn).css('background-color','#EF6909'); | |
| jQuery(btn).css('color','white'); | |
| },3000); | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment