Extracting share count from AddThis button with jQuery not working
Is there a another way to do thi开发者_运维知识库s. If I remove display:none (which i don't want to do) it works but not all the time.
I'm trying to get the share count from the addthis widget, that will be in a hidden area on my site and output that count in another element.
http://jsfiddle.net/agileapricot/TpV28/
Replace
$("#addthis_counter").text();
by
$("#addthis_counter").html();
Does that help ?
Get the contents of the counter element by with the
html()
function and
split(" ")[1];
the string to get what you want.
精彩评论