If I understand your question correctly you are trying to figure out if it's
better to initialize the javascript elements on the client side by id or by
some other kind of selector.

I use both Bootstrap and the Facebook apis and they both use data elements
and then automatically initialize the various widgets. As you say this does
not work in Zones so I created a run once javascript addition to
JavaScriptSupport to handle this. 

I did run across this benchmark which might be apply to zones. It appears

$(container).children('') is faster than $('container.children')

http://seesparkbox.com/foundry/jquery_selector_performance_testing

The good thing about that is container could be 'body' for a page load and
the zone id for a zone load. 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/5-4-JavaScript-Explicit-vs-Unobtrusive-initialization-tp5717787p5717819.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to