Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.59 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var initSharing = function() {
  2.     var $sharingDiv = $('.reading-share');
  3.     $sharingDiv.each(function(index, elem){
  4.             var $div = $(elem);
  5.             var dataUrl = $div.attr('data-url');
  6.             dataUrl = 'http://' + location.host + dataUrl;
  7.             $div.append('<a class="addthis_button_compact" addthis:url="' + dataUrl + '" >' +
  8.                         '<img src="https://d3hpq7sye6hoj5.cloudfront.net/m//base/images/share.png" />' + 'Share' +
  9.                         '</a>'
  10.                         );
  11.             });
  12.  
  13.     addthis.button('.addthis_button_compact');
  14. }