I have some divs in my HTML and I want to copy the contents of a div when I click on that div.
<div class="container">Hello</div>
<div class="container">World</div>
<div class="container">LearnJS</div>
So when I click on first div, it will copy the "Hello" on the clipboard.
I searched this site and found some zeroclipboard and clipboard.js, but I don't know how can I use it; I'm new to jQuery.
How would I write a function that copies the div's inner text onclick?