Re: Templates 1.2 – proper way to add components to profile home screen?
You are most welcome
I will suggest putting javascript with template files, reason, the javascript is mostly dependent on template and will change in custom templates, so give the user the ability to customize without modifying the plugin.
The problem for loading comes, when you want to activate your javascript function after activity is called, as Andy suggested in trac,
https://trac.buddypress.org/ticket/1616
Using ajaxStop for determining the case, though it is not the most efficient way. I am working on a custom javascript event thing, and if Bp1.2 is delayed for 2 weeks, I will put my solution for Andy’s review.
In other case, using the wp_print_scripts action and wp_enqueue_script is your best recourse.