Add class on document load

1 reply · opened Apr 19, 2018

NnikoslavsApr 19, 2018

Hello there,
how can I dynamically add class "stretched no-transition" to body tag?

I want to that before page loads

Kindly

EDIT:
Where to put this line of code:
$body.classList.add("stretched");

SSemicolon WebSTAFFMay 2, 2018

Hello,

You can simply add the following code before/after the js/functions.js File:


	jQuery(document).ready( function(){
		jQuery('body').addClass('stretched');
	});

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard