Remove division Tag if it’s empty.

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

Comments or Responses

Login to post response