A
A
Alexander Konovalov2018-06-01 00:49:26
JavaScript
Alexander Konovalov, 2018-06-01 00:49:26

How to show notification of successful copy?

Hello! I'm using clipboard to copy text on button click. When you hover over the button, the hint "copy" appears, but nothing happens when you click it. That is, the user does not understand whether the text is copied or not. How to display a hint that the text is copied?
https://codepen.io/anon/pen/XYbZwo

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2018-06-01
@Huf

In fact, it's understandable, because the text becomes highlighted.
You can also show a tooltip above the button, they say, added to the buffer or display a popup window

M
Maxim Timofeev, 2018-06-01
@webinar

Have you even read the first half of the main page? https://clipboardjs.com/
There is data-clipboard-text
There are events that the plugin throws on successful copying and on error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question