Hide div if it’s empty

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 373
<script type = "text/javascript">
$(function()
{
$('#btnHide').click(function()
{
if ($('#div').html().trim())
{
alert('Div Contains Data')
}
else {
$('#div').hide();
}
});
})
</script>

Comments or Responses

Login to post response