add class to body dependent on another class existing.
jQuery(function( $ ){ if($('.class-name').length !== 0) { $('body').addClass('class-name-added-to-body'); } });