Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How to start JS immediately after loading the ”Notifications page”

@prashantvatsh

Participant

Hi,

You can put code like this:

function buddypress_notifications_layout() {
	global $bp;
	if ('notifications'== $bp->current_component){
              wp_enqueue_script('test', 'http://example.com/wp-content/themes/twentyfifteen- 
              child/js/test.js', array('jquery'), '1.0', true);
        }
}
add_action('wp_enqueue_scripts', 'buddypress_notifications_layout');

Thanks

Skip to toolbar