关闭

share.js分享功能

别叨叨 1年前 ⋅ 124 阅读

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>test</title>
  <meta name="site" content="content site">
  <meta name="Site" content="content Site">
  <meta name="title" content="content title">
  <meta name="Title" content="content Title">
  <link rel="stylesheet" href="../dist/css/share.min.css">

  <style>
  .row{padding: 20px 0 0 20px}
  .row-pad{padding: 20px 0 0 60px}
  </style>
</head>
<body>
  <div class="row-pad">
    <h1>test</h1>
  </div>

  <ol>
    <li class="row">
      <div class="social-share" data-sites="weibo, qq, qzone"></div>
    </li>
    <li class="row">
      <div class="share-component" data-disabled="wechat , facebook, twitter, google"></div>
    </li>
    <li class="row">
      <div class="social-share"></div>
    </li>
    <li class="row">
      <div class="social-share" data-initialized="true">
        <a href="#" class="social-share-icon icon-weibo"></a>
        <a href="#" class="social-share-icon icon-qq"></a>
        <a href="#" class="social-share-icon icon-qzone"></a>
      </div>
    </li>
    <li class="row">
      <div class="social-share" data-mode="prepend">
        <a href="" class="social-share-icon icon-heart"></a>
      </div>
    </li>
    <li class="row">
      <div id="share-1"></div>
    </li>
    <li class="row">
      <div id="share-2"></div>
    </li>
    <li class="row">
      <div id="share-3" data-sites="weibo, qq, qzone"></div>
    </li>
    <li class="row">
      <div id="share-4" data-disabled="wechat , facebook, twitter, google"></div>
    </li>
  </ol>

<script src="../src/js/social-share.js"></script>
<script src="../src/js/qrcode.js"></script>
<script>
socialShare('#share-1');
socialShare('#share-2', {sites: ['qzone', 'qq', 'weibo','wechat']});
socialShare('#share-3');
socialShare('#share-4');
</script>
</body>
</html>

源码地址


全部评论: 0

    我有话说: