Created
March 18, 2015 16:15
-
-
Save 3200creative/57c448f29915af651dbc to your computer and use it in GitHub Desktop.
add class to body dependent on another class existing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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