View Demo Its very familiar to wordpress users copy to clipboard function in syntaxhighlighter. In wordpress a flash file is used. So I also use the same method for getting this done. You can download flash files and javascript files at the end of this post This is the code : Clipboard jquery.copy.js