sparkartgroup-archive / sparkart.js

Easily interact with Sparkart's APIs via Javascript.
1 stars 0 forks source link

Render event isn't firing in asynchronously loaded tab markup #32

Closed pushred closed 11 years ago

pushred commented 11 years ago

I have some widget markup defined inside pages that I'm loading asynchronously into other pages using the jQuery UI Tabs widget. The issue is that I'm also trying to bind some events to the Sparkart.js widget markup, so I'm trying to bind on the render event as I am when binding events to widget markup rendered serverside. It seems that render is not being triggered in this other instance even though the widgets are drawn correctly using the draw method.

Also, the render event presently lacks documentation.

Fauntleroy commented 11 years ago

linky

Fauntleroy commented 11 years ago

Right now the render event only fires once--after everything has rendered after the fanclub is initialized. I suppose I'll just have to name that something different, then fire render after every draw command...

pushred commented 11 years ago

http://www.ufcfightclub.com/home is where this is presently an issue. If you have a Premium membership and select the Pre-sales tab, you'll be upselled on two upgrades: Ultimate & Elite. We like to warn users that upgrades don't renew your membership, so I accomplish that throughout the site by launching a jQuery UI dialog when users click on upgrade links. Trouble is in this instance I have to load the pre-sales tab asynchronously to avoid slow functions from dragging page load down any more than they already are. But that tab contains the Plans widget which in turn contains upgrade links. I currently cannot bind my dialog to the click event for those links.