LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » Blogspot / Blogspot Tricks » Show/Hide Your Blogger Comments On Button Click

Show/Hide Your Blogger Comments On Button Click

Show-Hide-Your-Blogger-Comments-On-Button-Click
Comments are the important way to get readers feed back so if your Blog have soo many comments then it will take time to load and your page will go too long. Not every user want to read your comments or others feedback so then just get in for your content so why to show your others users comments to them so now for that we have a trick that you can hide that comments.

It not hide for all. Anyone need to read then they can see your comments by just clicking a button title then your comment will be displayed then you can see your comments and can comments more. There are many codes available online but here we have a little snippet for you that can work as per your desire. Go garb the little snippet and use it for go.

Features:

1.) Pure JavaScript Added.
2.) No JQuery File Added.
3.) Simple CSS Added.
4.) Simple And Fast Loading Code.
5.) Can Work With Any Browser.
6.) Work With Any Blogger Domain.
7.) Can See The Post Title and Post Thumbnails.
8.) Plain In Design.
9.) Fully Customizable With Your Design.
10.) Can Control Everything.

Recommended For You:
Submit Your Blogs And Website Free With Their RSS Feeds

How To Add In Blogspot?

1.) Go To Your www.blogger.com
2.) Open Your Desire “Blog”.
3.) Go To “Template”.
4.) Click “Edit HTML”.
5.) Now “Click” Within Code Box.
6.) Press [CTRL+F] To Search </head> Code.
7.) Now “Copy” The Below CSS/JavaScript And “Paste” It Before Upper Code.

CSS:

<!-- Show/Hide Comments DIV Data-->
<style type="text/css">
h2#commentsShowHideTitle {border:1px solid #DADADA;padding:10px;font-weight:bold;font-family:sans-serif;background:#EFEFEF;}
</style>

JavaScript:

<script type="text/javascript">
// Show/Hide Comments DIV Data
// Snippet BY @EXEIdeas
//<![CDATA[
function show_hide_commentsDIV()
{
var div = document.getElementById('commentsShowHideDIV');
div.style.display = (div.style.display == "none") ? "block" : "none";
var hed = document.getElementById('commentsShowHideTitle');
hed.innerHTML = (hed.innerHTML == "Show Comments") ? "Hide Comments" : "Show Comments";
}
//]]>
</script>
<!-- Show/Hide Comments DIV Data-->

8.) Again Press [CTRL+F] To Search <div class='comments-content'> Code.
9.) Now “Copy” The Below Code And “Paste” It Before Upper Code.

<!-- Show/Hide Comments DIV Data-->
<h2 id="commentsShowHideTitle" onclick="show_hide_commentsDIV()">Show Comments</h2>
<div id="commentsShowHideDIV" style="display:none;">
<!-- Show/Hide Comments DIV Data-->

10.) Again Press [CTRL+F] To Search <div id='backlinks-container'> Code.
11.) Now “Copy” The Below Code And “Paste” It Before Upper Code.
12.) Click “Save Template” And Done.

<!-- Show/Hide Comments DIV Data-->
</div>
<!-- Show/Hide Comments DIV Data-->

Customization:

Edit your CSS if you are a pro and want more customization.

Last Words:

That’s all we have. If you have any problem with this code in your blogger template then feel free to contact us with full explanation of your problem. We will reply you as time allow to us. Don’t forget to share this with your friends so they can also take benefit from it and leave your precious feedback in our comment form below. Happy blogging, See you in next article.

Recommended For You:
How Infographics Enhances Website Performance And ROI?

You Like It, Please Share This Recipe With Your Friends Using...

14 Responses to “Show/Hide Your Blogger Comments On Button Click”

  1. Thank you brother.worked like a charm.Great share once again.

  2. Taufeeq Umar says:

    Its really great thing to using show or hide for your blog comments, thank you very much for this interesting and helpful blog.

  3. Shariq says:

    Its great work this is nice way to attract audience and also unique and interesting article.

  4. I really like your blog, keep bloging like this.

  5. Jeet says:

    I am on blogger and have tried all options from blogger dashboard to show comments but it doesnot show the comment box. !! May be its locked in the theme which I am using. Any way how to enable it back , or if its hidden how to show?

  6. Tv Blog says:

    Very useful information, it really impressed me, I will share this article further with my friend. Thanks a lot.

    • EXEIdeas says:

      Welcome here and thanks for reading our article and sharing your view. This will be very helpful to us to let us motivate to provide you with more awesome and valuable content from a different mind. Thanks again.

  7. SDavidPrince says:

    please can you help bro
    i cant seem to integrate this on my template

Leave a Reply

Your email address will not be published. Required fields are marked *