How to copy div content to clipboard using jQuery

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

It works well on the demo, but when I copy it to my project it doesn't work, I get this on the console: {action: "copy", text: "", trigger: button.btn, clearSelection: ƒ}. It seams that it is not getting the text. I am using the same div with the same id and the same button with the same class and the same javascript in the demo, this is not about a mistake spelling any id or class

JobSayasTech