bp_dtheme_add_nojs_body_class( $classes )

Adds the no-js class to the body tag.


Description Description

This function ensures that the element will have the ‘no-js’ class by default. If you’re using JavaScript for some visual functionality in your theme, and you want to provide noscript support, apply those styles to body.no-js.

The no-js class is removed by the JavaScript created in bp_dtheme_remove_nojs_body_class().

See also See also


Top ↑

Source Source

File: bp-themes/bp-default/functions.php

function bp_dtheme_add_nojs_body_class( $classes ) {
	$classes[] = 'no-js';
	return array_unique( $classes );
}

Top ↑

Changelog Changelog

Changelog
Version Description
BuddyPress (1.5).1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.