social-sharer
Version:
最 Pure 的社会化分享按钮
56 lines (49 loc) • 1.7 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>jquery.social-sharer.js</title>
<link rel="stylesheet" href="../dist/social-sharer.min.css">
<style>
body { text-align: center; }
.content { margin: 250px 40px 50px; }
</style>
<meta property="og:title" content="title">
<meta property="og:description" content="description">
<meta property="og:image" content="image">
<meta property="og:url" content="url">
<meta property="og:site_name" content="site_name">
<!-- alternative -->
<mata name="description" content="description">
<link rel="canonical" href="url">
</head>
<body>
<div class="content">
<h1>jquery.social-sharer.js</h1>
<h3>最 Pure 的社会化分享按钮</h3>
<p><a href="https://github.com/Cople/SocialSharer">View on GitHub</a></p>
<div id="demo" class="social-sharer"></div>
</div>
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="../dist/jquery.social-sharer.min.js"></script>
<script>
$("#demo").socialSharer({
onRender: function(icon, service) {
console.log("onRender", icon, service);
},
onClick: function(event, service) {
console.log("onClick", event, service);
}
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46659645-5', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>