Last active
December 9, 2017 01:30
-
-
Save RiFi2k/0aa2f344c85b6b637cd8a397f4f2b059 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copy to Clipboard | |
* | |
* Depends on clipboard.js v1.5.5 | |
* https://zenorocha.github.io/clipboard.js | |
*/ | |
var clipboard = new Clipboard('.copyToClipboard'); | |
clipboard.on('success', function(e) { | |
$(e.trigger).tooltip('show'); | |
setTimeout(function(){ $(e.trigger).tooltip('destroy') }, 2000); | |
e.clearSelection(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment