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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:44:43+00:00 2026-06-08T01:44:43+00:00

Today I looked at the source code of the jQuery function removeClass: There is

  • 0

Today I looked at the source code of the jQuery function removeClass:
There is the following line:

className = (" " + elem.className + " ").replace( rclass, " " );

rclass:

rclass = /[\n\t\r]/g,

In the book “JavaScript The Definitve Guide” from David Flanagan, 6th Edition, on page 438 there are the following sentence:

…, so the HTML class attribute is available to JavaScript code using
the name className. … and the class attribute holds a
space-separated list of class names.

Why the jQuery coders assume that the class names can also be separated by tabs and line feeds?

  • 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-08T01:44:44+00:00Added an answer on June 8, 2026 at 1:44 am

    Lots of web “developers” know almost nothing about what they are doing and thus write crappy code containing e.g. tab- or linefeed-separated class names.

    It is a common principle to “be generous when reading but strict when writing”, i.e. accept things that do not really follow $standard but never create such things.

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

Sidebar

Related Questions

Today I looked into the header source code of boost::asio::ip::address and found the following
Today, I have looked into HTML code of facebook.com, and found something like this:
I came accross the following code today and I didn't like it. It's fairly
I looked at some Java code today, and I found some weird syntax: public
Today, a fellow team member checked-in some code that looked like this var query
Today I looked at the ZipEntry class and found the following: public class ZipEntry
Today I've looked over some C code that was parsing data from a text
There is an example for today here Get row where datetime column = today
My site used to look the same in IE, Chrome, Firefox. Today, I looked
Later today, I was scrolling through ejhon.com slides and I found out the following:

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.