diff --git a/js/script.js b/js/script.js index d6ff1dacf8..9b9dde3958 100755 --- a/js/script.js +++ b/js/script.js @@ -25,7 +25,7 @@ function copyCode(elem){ } target.value = document.getElementById(elem).innerText; // select the content - target.setSelectionRange(0, target.value.length); + target.select(); // copy the selection var succeed; @@ -520,4 +520,4 @@ $(function() { if (!$('#home').length > 0 ) { $('#hero').addClass('no-sub'); } -}); \ No newline at end of file +});