Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function() {
- var $social = $('#social-icons');
- var link = encodeURIComponent(window.location.href);
- var title = encodeURIComponent(document.title);
- $social.find('a#facebook').click(function(){
- return shareLink('http://www.facebook.com/sharer.php?u=' + link);
- });
- $social.find('a#digg').click(function(){
- return shareLink('http://digg.com/submit?phase=2&url='+link+'&title='+title);
- });
- $social.find('a#reddit').click(function(){
- return shareLink('http://reddit.com/submit?url='+link+'&title='+title);
- });
- $social.find('a#twitter').click(function(){
- var text = encodeURIComponent("I'm reading about Victor, the only wooden trap made in the USA! ") + link;
- return shareLink('http://twitter.com/home/?='+text);
- });
- $social.find('a#stumble').click(function(){
- return shareLink('http://www.stumbleupon.com/submit?url='+link +'&title='+title);
- });
- });
- function shareLink(url){
- window.open(url, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no');
- return false;
- }
Add Comment
Please, Sign In to add comment