Monday, 6 June 2016

Remove all p tag contains space


How to remove all p tag contains space


Solution : 

jQuery('p').each(function(){
   var htm=jQuery(this).html();
  if(htm==' ')
  {
    jQuery(this).remove();
  }
})

This small jquery will remove all empty p tag on page
banner
Previous Post
Next Post

0 comments: