Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery copier dans le presse papier

$('.copy_button').on( 'click', function(e){
        e.preventDefault();
        copyToClipboard( $(this).attr('href') );
    });

    function copyToClipboard(element) {
        var $temp = $("<input>");
        $("body").append($temp);
        $temp.val(element).select();
        document.execCommand("copy");
        $temp.remove();
    }
Source by www.grafikart.fr #
 
PREVIOUS NEXT
Tagged: #jquery #copier #dans #le #presse #papier
ADD COMMENT
Topic
Name
4+6 =