Shubham Kumar

Hey, I am Shubham and i love Blogging, Coding and exploring new things and obviously sharing my experience with you.

You may also like...

10 Responses

  1. Reezal says:

    How do you force users to finish clicking all button then only they are allowed to view the content ?

  2. Hello please how can I use this on blogspot blogs? Thanks

    • Add the Below javascript above </head>

      <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
      <script type="text/javascript">
      //<![CDATA[
      (function(a){a.fn.jumboShare=function(e){var g=Math.floor((Math.random()*1000)+1);var f=a.extend({url:window.location.href,text:document.title,twitterUsername:"mycodingtricks",id:g,total:0,position:"prepend"},e);this.each(function(){var j=a(this);switch(f.position){case"append":j.append(i());break;default:j.prepend(i());break}a.getScript("//assets.pinterest.com/js/pinit.js");b()});function i(){var j="<div class='mct_jumboShare' id='jumboShare_"+f.id+"'><div class='mct_jumboShare_container'><div class='mct_jumboShare_counter' id='jumboShare_counter_"+f.id+"'>0</div><div class='mct_jumboShare_buttons' id='jumboShare_buttons_"+f.id+"'><a target=_blank rel=nofollow href='https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(f.url)+"&t="+encodeURI(f.text)+"' class='jumboShare_btn facebook'><sapn class='jumboShare_btn_text'>facebook</span></a><a target=_blank rel=nofollow href='https://twitter.com/intent/tweet?via="+f.twitterUsername+"&url="+encodeURIComponent(f.url)+"&text="+encodeURI(f.text)+"' class='jumboShare_btn twitter'><sapn class='jumboShare_btn_text'>Twitter</span></a><a target=_blank rel=nofollow href='https://plus.google.com/share?url="+encodeURIComponent(f.url)+"' class='jumboShare_btn google'><sapn class='jumboShare_btn_text'>Google+</span></a><a target=_blank rel=nofollow href='https://www.linkedin.com/cws/share?token&isFramed=false&url="+encodeURIComponent(f.url)+"' class='jumboShare_btn linkedin'><sapn class='jumboShare_btn_text'>LinkedIn</span></a><a rel=nofollow href='https://www.pinterest.com/pin/create/button' data-pin-custom='true' data-pin-do='buttonBookmark' class='jumboShare_btn pinterest'><sapn class='jumboShare_btn_text'>Pin It</span></a><a target=_blank rel=nofollow href='https://buffer.com/add?url="+encodeURIComponent(f.url)+"&text="+encodeURIComponent(f.text)+"' class='jumboShare_btn buffer'><sapn class='jumboShare_btn_text'>Buffer</span></a></div>"+unescape("%3C%61%20%68%72%65%66%3D%22%68%74%74%70%3A%2F%2F%6D%79%63%6F%64%69%6E%67%74%72%69%63%6B%73%2E%63%6F%6D%2F%6A%71%75%65%72%79%2F%6A%75%6D%62%6F%73%68%61%72%65%2D%73%6F%63%69%61%6C%2D%73%68%61%72%65%2D%63%6F%75%6E%74%65%72%2D%77%69%74%68%2D%73%6F%63%69%61%6C%2D%62%75%74%74%6F%6E%73%2F%22%20%63%6C%61%73%73%3D%22%6A%75%6D%62%6F%53%68%61%72%65%5F%6D%63%74%22%20%74%61%72%67%65%74%3D%22%5F%62%6C%61%6E%6B%22%20%74%69%74%6C%65%3D%22%47%65%74%20%54%68%69%73%20%4A%75%6D%62%6F%53%68%61%72%65%20%66%6F%72%20%79%6F%75%72%20%57%65%62%73%69%74%65%22%3E%4D%3C%2F%61%3E")+"</div>";return j}function d(j){if(j>=1000000000){return(j/1000000000).toFixed(1)+"G"}if(j>=1000000){return(j/1000000).toFixed(1)+"M"}if(j>=1000){return(j/1000).toFixed(1)+"K"}return j}function h(j){f.total=f.total+j}function c(){a("#jumboShare_counter_"+f.id).html(d(f.total)+"<div>SHARES</div>").fadeIn()}function b(){var k=this;a.getJSON("http://cdn.api.twitter.com/1/urls/count.json?url="+encodeURIComponent(f.url)+"&callback=?",function(l){h(l.count);c()});a.getJSON("https://api.bufferapp.com/1/links/shares.json?callback=?&url="+encodeURIComponent(f.url),function(l){h(l.shares);c()});a.getJSON("https://api.facebook.com/method/fql.query?format=json&query=SELECT+total_count+FROM+link_stat+WHERE+url+%3D+%27"+encodeURIComponent(f.url)+"%27&callback=?",function(l){h(l[0].total_count);c()});a.getJSON("https://www.linkedin.com/countserv/count/share?url="+encodeURIComponent(f.url)+"&format=jsonp&callback=?",function(l){h(l.count);c()});a.getJSON("http://api.pinterest.com/v1/urls/count.json?callback=?&url="+encodeURIComponent(f.url),function(l){h(l.count);c()});var j={method:"pos.plusones.get",id:f.url,params:{nolog:true,id:f.url,source:"widget",userId:"@viewer",groupId:"@self"},jsonrpc:"2.0",key:"p",apiVersion:"v1"};a.ajax({type:"POST",url:"https://clients6.google.com/rpc",processData:true,contentType:"application/json",cache:true,data:JSON.stringify(j),success:function(l){h(l.result.metadata.globalCounts.count);c()}})}return this}}(jQuery));
      jQuery(document).ready(function($){
       $(".post-body.entry-content").jumboShare({
      
         //Replace mycodingtricks to your twitter username
         twitterUsername: "mycodingtricks" 
      
        });
      });
      //]]>
      </script>
      

      Replace mycodingtricks with your twitter username.
      If you don’t know where is </head> then read this artile : http://mycodingtricks.com/beginners-guide/blogspot-how-to-add-javascript-code-in-blogger-blog/

  3. said says:

    Hi,

    Thanks. for this simply and best tutorial

    But you forgot attachments the Jquery lib or link for jquery in index.html

Leave a Reply

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