amespower
amespower

Reputation: 917

changing size of addthis social sharing buttons

Using the 'AddThis' smart API for social sharing, does anyone know how to set the buttons to small size? Seems like it should be a simple setting but I've been unable to find it and am stuck with the 32 x 32. http://support.addthis.com/customer/portal/articles/1200473-smart-layers-api#.Usw3JmRDs9E

So far I have the following code and tried adding width and height but it didn't work:

addthis.layers({
    'theme' : 'transparent',
    'share' : {
    'position' : 'left',
    'services' : 'facebook, twitter, linkedin, email, print, more',
    //'width' :  "16px",
    //'height' :  "16px"
} 

Upvotes: 1

Views: 1925

Answers (2)

Joseph Wolff
Joseph Wolff

Reputation: 1

My solution for changing size of addthis social sharing sidebar / buttons is to add a javascript snippet, as follows, at the botttom, after the addthis script:

function shrink() {
  var rslt = $('.atss a .at-icon-wrapper').css ( { padding: 0, width: '32px' } );
  //console.log (rslt.length, rslt);  // uncomment this if you want to debug
  if (rslt.length == 0)
    setTimeout (shrink, 500);
}

$(document).ready(function() {
  setTimeout (shrink, 500);
});

This works, and can be seen in action at https://eracks.com - and the resize is never visible (at least I have never seen it yet), no matter what the connection speed / bandwidth is.

j

Upvotes: 0

amespower
amespower

Reputation: 917

In case anyone wonders, turns out the smart API doesn't allow size changes on the buttons. Only the share button option allows size changes: https://www.addthis.com/get/sharing

Upvotes: 1

Related Questions