Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7806969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:42:14+00:00 2026-06-02T02:42:14+00:00

how to hide attributes if detect this <p> &nbsp;</p> My problem is when my

  • 0

how to hide attributes if detect this <p> &nbsp;</p>

My problem is when my client insert data(example table) with ckeditor , when i see the source code , ckeditor will add this <p> &nbsp;</p> after table code. i know how to remove this manualy with source code(open source code and delete) but not my client!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:42:15+00:00Added an answer on June 2, 2026 at 2:42 am

    Orignal answer : How do I remove empty p tags with jQuery?

    Try

    $('p').each(function() {
     var $this = $(this);
     if($this.html().replace(/\s|&nbsp;/g, '').length == 0)
         $this.remove(); }); 
    

    here is working code : http://jsfiddle.net/ambiguous/7L4WZ/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to make a table with data attributes on the rows and the
This .show and .hide works great in Firefox 3 but not in IE 7.
in python tutorial added that python cannot hide its attributes from other classes. some
I'm using html5 data attributes to store information about record and create a preview
I have a WPF StackPanel that looks like this: (some attributes removed that don't
I'm changing this div's (#logo)attributes like this $('#logo').stop().animate({ left: 150, height: 78, marginTop: 45
I'm trying to translate this script to jQuery. See rails casts #88 var colors
I'm working on a website with simple jquery effects, like show, hide... http://emilione.altervista.org/works.html This
I would like to make my table filter more elegant. Basically, this table will
I want to hide the Next button on my ASP.NET Wizard control using JavaScript.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.