Creating "Follow" buttons on the fly


#1

Hi,

I’m creating a simple “backbone.js” application, and in it I have the following in one of my templates:

Follow @<%= twittername %>

I’m creating the view that uses this template dynamically and bringing up a tooltip with the “follow” button on it, or well, that’s what I am trying to do. When I roll over an element that exhibits this behavior the first time, I get exactly what I would expect, however, every subsequent roll over simply shows the “Follow @USERNAME” in plain link text and it never gets styled.

Has anyone ever run into this issue or have any idea how I might be able to fix it?

Thanks,

–d


#2

SOLUTION:

I move the async load out of the template and into the “head” of my index file and now can call twtter.widgets.load() whenever I render the popup.

–d


#3