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 7531687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:14:24+00:00 2026-05-30T05:14:24+00:00

JSFiddle: http://jsfiddle.net/QbyUR/ So, I have an empty TD, that I’m trying to remove the

  • 0

JSFiddle: http://jsfiddle.net/QbyUR/

So, I have an empty TD, that I’m trying to remove the white space from.

Normally I’d do this:

ee.replace(/\s+/, '') == "" // check to see if TD is empty.

the above returns false

but, it wasn’t working so I pasted the contents of my TD to a unicode decoder and got this:

U+000D <control> character
U+000A <control> character
U+0009 <control> character
U+0009 <control> character
U+0009 <control> character
U+0009 <control> character
U+0020 SPACE character

or

&#x000d;&#x000a;&#x0009;&#x0009;&#x0009;&#x0009;&#x0020;

The text that I converted is here:

-------


-------

(in between the two lines)

this is what I used: http://software.hixie.ch/utilities/cgi/unicode-decoder/utf8-decoder

I’m 100% certain it’s the control characters that are messing me up. And they are bound to be different across all browsers…

How do I get rid of them? is a regex replace going to be sufficient?

  • 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-05-30T05:14:26+00:00Added an answer on May 30, 2026 at 5:14 am

    The real problem here is that you’re using innerText, which is not a property on jQuery objects but rather on DOM elements. Simply use the jQuery function .text() instead:

    var e = $(".td");
    var result = e.text().replace(/\s+/, '') == ""; // check to see if TD is empty
    
    alert(result);​
    

    And everything will work fine. Right now, the string is actually "undefined" because you appended an empty string to a nonexistent property.

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

Sidebar

Related Questions

I have created this jsfiddle: http://jsfiddle.net/mfnxm/1/ I am trying to create this JSON: [{
If you look at this JSfiddle http://jsfiddle.net/littlesandra88/G3N4m/ you will see that I have input
In this jsfiddle http://jsfiddle.net/littlesandra88/eGRRb/ have I submit buttons that are auto-generated. Each table row
I have the following jsFiddle: http://jsfiddle.net/tad604/dpRca/2/ That works as desired on IE and Chrome,
I have the following jsFiddle - http://jsfiddle.net/uShjA/ - and I am trying to do
In this JSFiddle http://jsfiddle.net/littlesandra88/mzPxN/ am I trying to use the tablesorter plugin to sort
Check out this jsfiddle http://jsfiddle.net/Y7fEW/ . I'm trying to get the tan div on
In this jsFiddle http://jsfiddle.net/littlesandra88/RBU8K/ have I the following code function addRemove(id) { alert(1); $('#'+id).toggle(function()
I have this jsfiddle http://jsfiddle.net/fwQq4/19/ Here I have the wrapper class ( div.wrapper )
jsFiddle: http://jsfiddle.net/KUcrm/ I have this code: HTML <input id=Check1 type=checkbox name=ckbRG tabindex=1 checked /><label

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.