tbranyen/backbone.layoutmanager — Issue #15: An event or a way to run some javascript after a view element has been added to the DOM
Author: nkvoll
Created: 2011-12-06 00:09:41+00:00
State: open

Some jQuery plugins (and RaphaelJS) require a element that is currently attached to the DOM before they can be initialized / used.

The current methods (from the jQuery plugins part of the readme) currently does not allow the user to do this reliably.

Using such plugins in "main.render(function(el) {..." doesn't work, because if the templates are fetched asynchronously, the function gets called before the views are rendered if they aren't cached.

Using the plugins in the views (return layout(this).render().then(function(el) {...) doesn't work either, because the then-function is called before the element is added to the DOM.