Skip to content

Instantly share code, notes, and snippets.

@3200creative
Created March 18, 2015 16:15
Show Gist options
  • Save 3200creative/57c448f29915af651dbc to your computer and use it in GitHub Desktop.
Save 3200creative/57c448f29915af651dbc to your computer and use it in GitHub Desktop.
add class to body dependent on another class existing.
jQuery(function( $ ){
if($('.class-name').length !== 0)
{
$('body').addClass('class-name-added-to-body');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment