Here is my test page: http://ignitepixels.com/test/shareThisTest.html
I am having an issue with dynamically generating ShareThis buttons with Javascript. For most of my buttons I want to use the "chicklet" type. But I also want to include the twitter share hcount and facebook like hcount buttons.
Normally (without javascript) you would use something like:
<span class='st_twitter'></span>
<span class='st_facebook'></span>
<span class='st_linkedin'></span>
<span class='st_googleplus'></span>
<span class='st_email'></span>
<span class='st_reddit'></span>
<span class='st_twitter_hcount'></span>
<span class='st_fblike_hcount'></span>
But I am trying to dynamically generate these buttons using:
stWidget.addEntry({
"service" : shareService,
"element" : document.getElementById(shareElemendID),
"url" : shareURL,
"title" : shareTitle,
"type" : shareType,
"onhover" : false
});
(Note: my shareType var is dynamically generated with javascript. You can see the javascript by viewing the test page's source.)
I can use "chicklet"
as the hard value for "type"
but this does not render the hcount buttons correctly. So I have a bit of js that determines whether to use "chicklet" or "hcount", but even hcount has funny results. (See http://ignitepixels.com/test/shareThisTest.html under header "Dynamic ShareThis Buttons").
Anyone have any clue what type should I be using for the hcount buttons I am using in my javascript?
Thanks!