Check for Empty Elements

For example, Check for Empty Elements...


HTML

<div id="element-check"></div>

Javascript

// Check for Empty Elements
$(function(){
    $('#element-check').each(function() {
            if ($(this).text() == "") {
                    
                    //This element a Empty
                    
            }else{
                
                    // This element a doesn't Empty
                    
            }
    });
})
  • Share
  • Copyright 2016 by WebiBeris.com. All Rights Reserved.