Selected text sharer – Demo

by Aakash Chakravarthy

HTML

<script src="http://www.aakashweb.com/resources/js/selected-text-sharer.js"></script>
<h2 id="jquery"><b>Non Jquery version</b></h2>
<small>Select a text to show widget</small>

<div class="demo1 sec">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it</div>

<div class="demo2 sec">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it</div>

<div class="demo3 sec ">Lorem Ipsum is simply dummy text of the <code>printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</code>, when an unknown printer took a galley of type and scrambled it</div>

<div class="demo4 sec">
    <h3>Can be added to a input and textareas also</h3>
    <input type="text" value="Select me" /><br/><br/>
    <textarea>Select me too ...</textarea>
</div>

CSS

.sec {
    border-bottom: 1px solid #DFDFDF;
    padding: 15px 0;
}

JavaScript

var sts_config = {
    title: "Share this text ...",
    lists: "Twitter,http://twitter.com/home?status=%ts ,favicon|Facebook,http://www.facebook.com/sharer.php?t=%s&u=http://google.com,favicon|Wikipedia (en),http://en.wikipedia.org/w/index.php?title=Special:Search&search=%s,favicon|Google Maps,http://maps.google.com/?q=%s,favicon",
    truncateChars: "115",
    extraClass: "",
    borderColor: "#430070",
    background: "#fff",
    titleColor: "#f2f2f2",
    hoverColor: "#c2f7ff",
    textColor: "#000"
};