09.04.2019, 07:46
You can hide an element if there are no elements with a certain class:
Add custom-menu-item class to any of your menu links and add custom-menu class to menu image.
Code:
$(function() {
if (!$('.custom-menu-item').length) {
$('.custom-menu').addClass('hide');
}
});
Add custom-menu-item class to any of your menu links and add custom-menu class to menu image.