ShareBtns with counter (ShareThis)
How do I make an sharebtns with counter (sharethis)?
Facebook and Twitter sharebuttons made with counter, using ShareThis api. What is a sharebtns with counter (sharethis)? How do you make a sharebtns with counter (sharethis)? This script and codes were developed by Nicolaj Lund Nielsen on 07 September 2022, Wednesday.
ShareBtns with counter (ShareThis) - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>ShareBtns with counter (ShareThis)</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="tools"> <div class="st_facebook_custom" displayText='Facebook'> <div class="countbox"> <b>Del</b> <span id="fbcount"></span> </div> </div> <div class="st_twitter_custom" displayText='Twitter'> <div class="countbox"> <b>Del</b> <span id="twitcount"></span> </div> </div>
</div> <script src='https://wd.sharethis.com/button/buttons.js'></script> <script src="js/index.js"></script>
</body>
</html>
ShareBtns with counter (ShareThis) - Script Codes CSS Codes
.tools { text-align:left; padding:0; height:24px;
} .tools > div { cursor:pointer; float:left; height:24px; line-height:20px; color:#fff; background-position: 0 -1px; background-color:#e5e4e4; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; } .tools > div .countbox { width:0; overflow:hidden; -webkit-transition: width .4s ease-out; -moz-transition: width .4s ease-out; -ms-transition: width .4s ease-out; -o-transition: width .4s ease-out; transition: width .2s ease-out; } .tools > div .countbox.shared, .tools > div .countbox.shared { width:56px; } .tools > div .countbox span { text-align:center; display:inline-block; width:24px; line-height:20px; padding:2px 0; margin-left:4px; }
#print { margin:5px 0 0 7px; height:18px;
} #print span { text-indent:-9999px; }
div.st_facebook_custom { margin-left:10px; padding-left:24px; background: url(http://html5.dis-play.dk/testcenter/nicolaj/dump/facebook.png) no-repeat; background-color:#3E5B97
} .st_facebook_custom span { border-left:1px solid #2f477f; color:#8ca8e6; }
div.st_twitter_custom { margin-left:10px; padding-left:24px; background:url(http://html5.dis-play.dk/testcenter/nicolaj/dump/twitter.png) no-repeat; background-color:#2AA7DE
} .st_twitter_custom span { border-left:1px solid #0095d1; color:#04789f; }
ShareBtns with counter (ShareThis) - Script Codes JS Codes
var fbCount = document.getElementById('fbcount');
var twitCount = document.getElementById('twitcount');
var shareUrl = encodeURIComponent(document.location.href);
stLight.options({ publisher: '249941c7-9ea8-401d-93e9-3b4763632ce3', doNotHash: false, doNotCopy: true, hashAddressBar: true });
stButtons.getCount(shareUrl, "facebook", fbCount);
stButtons.getCount(shareUrl, "twitter", twitCount);
var checkInterval = setInterval(checkShareBtns, 100);
function checkShareBtns() { if(fbCount.innerHTML !== ""){ clearInterval(checkInterval); if (fbCount.innerHTML !== "0") { fbCount.parentNode.className = "countbox shared"; } if (twitCount.innerHTML !== "0") { twitCount.parentNode.className = "countbox shared"; } }
}
Developer | Nicolaj Lund Nielsen |
Username | nicolund |
Uploaded | September 07, 2022 |
Rating | 3 |
Size | 2,525 Kb |
Views | 44,528 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Tweenmax Integer Tween | 1,884 Kb |
TimelineMax Circular loader | 2,649 Kb |
TweenMax transformOrigin Bubble | 2,209 Kb |
FrameByFrame CSS animation | 1,713 Kb |
TweenMax staggerTo worm | 2,074 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Twitch.tv API | Ryzokuken | 2,618 Kb |
Firefox Breakout Guide | Quincysoeliman | 2,576 Kb |
Cloud upload | Jaflo | 2,774 Kb |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
Click Based Rotation Demo | Zeaklous | 2,086 Kb |
Buttons for autumn | Nikazawila | 1,795 Kb |
Bloomberg Style Link Hover | Gil-- | 1,609 Kb |
Using Flickr API | MoyArt | 6,761 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!