Multiple share buttons created with click event


#1

I have a jQuery click event attached to a button. When I click the button it crease a share button using the code:
twttr.widgets.createShareButton(
’’,
document.getElementById(‘tweet’), {
text: quotes[r].quote
}
);
I need a new button to be created each time the button attached to the jquery click event is pushed. The problem is the code I have create a new each time the click happens leaving me with multiple share buttons. I tried the .empty() jQuery method (and it removes the button and then creates a new one) but I think this solution has an issue as I do not see the counter updating. Any solutions?


#2