Hide unwanted html that came from javascript editors (like tinymce, etc.)


/ Published in: jQuery
Save to your folder(s)

This simple snippet let's you hide unwanted strings inside paragraphs.
I use this for text that come from javascript editors like tinymce.


Copy this code and paste it in your HTML
  1. $(document).ready(function(){
  2. $('.div p').each(function(){
  3. $innerHtml = $(this).html();
  4. if($(this).html() == " " || $(this).html() == undefined || $(this).html() == ""){
  5. $(this).hide();
  6. }
  7. });
  8. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.