jQuery has a :empty
selector. So, you can simply do:
$('div.section:empty').hide();
More Related Contents:
- Allowing frontend JavaScript POST requests to https://accounts.spotify.com/api/token endpoint
- jQuery find parent form
- jQuery UI Slider (setting programmatically)
- Autofocus input in twitter bootstrap modal
- What HTTP status codes count as success in jQuery.ajax?
- Autocomplete disallow free text entry?
- Determine mouse position outside of events (using jQuery)?
- handle ajax error when a user clicks refresh
- How to select a table column with jQuery
- Switch positions of 2 divs with jQuery
- Preventing “SCRIPT5: Access is denied” error in IE
- Overriding CSS styles of the jQuery UI Tooltip widget
- Looking for a JQuery plug-in similar to Accordion, but that allows multiple sections open at once [closed]
- Trigger click jquery not working
- How do I console.log a jQuery DOM Element in Chrome?
- Can jQuery .load append instead of replace?
- Mobile Safari $(window).height() URL bar discrepancy
- jQuery to trigger a click on an iFrame?
- changing data attribute isn’t working
- How do you make a picture follow your mouse pointer with jquery?
- JQuery :contains function limit to exact match
- how to push a message from web server to browser using node js
- jQuery multiple input name[] validation
- How to destroy a DOM element with jQuery?
- Keep Bootstrap dropdown open on click
- Jquery UI tooltip does not support html content
- JQuery ajax call default timeout value
- DataTables fixed headers misaligned with columns in wide tables
- How do I POST an array of objects with $.ajax (jQuery or Zepto)
- scrolltop with animate not working