Follow us on Youtube.  | Follow Website !

Search Suggest

How to add auto selecting on Blogger

What's up NQnia lover? In this tutorial, you will talk about how to add auto-selection on Blogger. Let's tell you what is auto-selection. Auto-selection is one kind of script if you use this script you will able to add select text option for demo scroll down and click on any code box of this post. Now follow all the steps of this post to add auto-selecting text.
Go to Blogger dashboard - Theme - three-dot - Edit HTML. Now search for </body> tag and add the belowe code after </body> tag.

// Selection
function autoSelect(elem) {
var selection, range;
if (window.getSelection) {
selection = window.getSelection();
range = document.createRange();
} else if (document.selection) { // IE
selection = document.selection.createRange().text;
range = document.body.createTextRange();
$('pre,kbd').on("click", function() {

Now how to add auto-section on Blogger post. Just with pre kbd code and done.
ex. <pre>Paste code....</pre> , <kbd>Paste Code...</kbd>

Post a Comment