You can do this using only CSS:
div:empty { display: none }
More Related Contents:
- How to change the element of another div by clicking and hovering on an element of a different div
- Hide/Show div on specific page with jquery
- CSS block doesn’t show click on a button
- how to force list items to go to differents rows?
- Issue with a design when content increase [closed]
- Dropdown Z-index not responding [closed]
- How to change color of SVG image using CSS (jQuery SVG image replacement)?
- Auto-size dynamic text to fill fixed size container
- Access the css “:after” selector with jQuery [duplicate]
- Firing events on CSS class changes in jQuery
- Downloading jQuery UI CSS from Google’s CDN
- Create a CSS rule / class with jQuery at runtime
- How do I switch my CSS stylesheet using jQuery?
- How do I get background image size in jQuery?
- Is it possible to use jQuery to get the width of an element in percent or pixels, based on what the developer specified with CSS?
- Selecting elements with a certain background color
- Remove CSS from a Div using JQuery
- Correct way to animate box-shadow with jQuery
- Leaving out the last semicolon of a CSS block
- Add CSS to iFrame [duplicate]
- Changing Body Font-Size based on Font-Family with jQuery
- jQuery check if element has a specific style property defined inline
- jQuery/CSS: line-height of “normal” == ?px
- Trying to make multiple background images cycle through a slideshow with CSS and JQUERY
- Leave menu bar fixed on top when scrolled [closed]
- Change the body background image with fade effect in jquery
- JQuery search in static HTML page with highlighting of found word
- The .fadeOut() method to use visibility property instead of display property
- Bootstrap Carousel showing next and previous image
- Possible to have a floating horizontal scrollbar?