can't get "clipboard.js" to work
Make sure you add the right library first ;)
<script src="https://cdn.jsdelivr.net/clipboard.js/1.5.3/clipboard.min.js"></script>
Or your local min.js
I've altered your code to this:
<div id="copy">
@item.Type
Name...: @item.Name
Address: @item.Address
</div>
<button class="copyButton" id="copyButtonId" data-id="@item.Type"
data-clipboard-action="copy" data-clipboard-target="div#copy">Copy!</button>
and the js:
var clipboard = new Clipboard('.copyButton');
clipboard.on('success', function(e) {
console.log(e);
});
clipboard.on('error', function(e) {
console.log(e);
});
With me it copies the div now. Let me know if it doesn't for you.