How To Install Double Click To Selection in Blogger Website

How To Install Double Click To Selection in Blogger Website

Hey Guys. Welcome Back in my blog. in the previous article we discussed How To Add Custom Scrollbar in Blogger Website To Make It Look Attractive , and in this article I will give a tutorial on How To Install Double Click To Selection in Blogger Website. This method works to select all the text on the blog if you double-click on the mouse.

This tutorial is very suitable for those of you who have a tutorial blog or the like, which require copy and paste functions, this method is very simple and makes it easy for visitors not to do text selection manually but just press the button twice.

How To Install Double Click to Select All on Blog :-

Step 1 :- Go to the blogger page and go to Themes > Edit HTML.
Step 2 :- After that you look for the code </body>
Step 3 :- Enter the code below right above it.
  <script type='text/javascript'>
//<![CDATA[
//Double Click To Selection
for (var pres = document.querySelectorAll("blockquote,pre"), i = 0; i < pres.length; i++) pres[i].addEventListener("dblclick", function() {
  var e = getSelection(),
    t = document.createRange();
  t.selectNodeContents(this), e.removeAllRanges(), e.addRange(t)
}, !1);
//]]>
</script>
  
Step 4 :- Now Save the Theme and See the Results. Finished.

Please replace the part that I have marked with the id or class that you want to activate by double clicking, for the part that I marked is the default from the syntax highlighter and also the blockquote or quote function on the blog.

Last Words :-

In this post, I have talked about  How To Install Double Click To Selection in Blogger Website. Tell us What You Say About The Post by Making a Comment and if you have any questions Contact Us at the Contact Us page. Hope You Enjoy In Our Website.

Refrence:
www.mrhasan.online

Our Posts Are Protected By DMCA.com. Don't Copy Our Post. MrHasan has All Rights Reversed.

MrHasan is a website where you can find html, css, js, seo, adsense, premium blogger templates, blogger tips and tricks, blogger widgets & many more.

1 comment

  1. Casino Roll
    ‎Join 바카라 사이트 Casino Roll Online https://septcasino.com/review/merit-casino/ Casino poormansguidetocasinogambling Roll septcasino 2021 herzamanindir.com/