<span class="confirmButton" data-clipboard-text="Test Text"></span>
function copyToClipBoard() {
var clipboard = new Clipboard(".confirmButton");
console.log(clipboard);
clipboard.on("success", function (e) {
alert("1");
});
clipboard.on("error", function (e) {
alert("2");
});
}
there is no alert output, only console output.