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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:01:29+00:00 2026-06-11T16:01:29+00:00

enter code here I am having a little problem with jquery.empty(). I have some

  • 0

enter code hereI am having a little problem with jquery.empty().
I have some Html Divs which look like below:

<div id="Description_Error" class="ui-helper-hidden errorMessage"></div>
    <div id="Order_Error" class="ui-helper-hidden errorMessage"></div>
    <div id="ColorHex_Error" class="ui-helper-hidden errorMessage"></div>

These Divs get filled up at run time with some Uls and Lis. They are basically used to show the errors. Now I am wiping out all the errors that it was showing before I do a POST.

I use

$(‘ui-helper-hidden errorMessage’).empty();

for that. Now, i fit is showing all three errors then it will wipe out two bue leave one. If it is showing only one error at the time then it will not be removed at all. I am not sure why class selection decides to leave one element behind all the times. Anyway, i tried to replicate the same behavior on Jsfiddler but it works fine. I am not able to find a clue on what might be wrong on my code. Any suggestions?

here is the fiddler link which works all file. Just my HTMl code does not work fine:

http://jsfiddle.net/g55Rs/3/

  • 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-11T16:01:30+00:00Added an answer on June 11, 2026 at 4:01 pm

    You are neither refering to a class nore an element identifier.

    $('ui-helper-hidden errorMessage').empty();
    

    To reference classes use the . and to use element identifiers use #.

    In your case this will empty all the divs:

    // Selecting all elements which have both classes
    $('.ui-helper-hidden.errorMessage').empty();
    

    DEMO – Empty all element which have both classes

    I also added some element which only have one or the other class in the DEMO to show that they are not effected.

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

Sidebar

Related Questions

I have <.ImageView> enter code here s(icons) in my android layout xml file, which
Hello guys im having little problem here, Firstly i want to parse string which
enter code here My jquery ui dialog contains an iframe and has the option
enter code here I have a table on SQL server 2005 with bigint primary
enter code here Hi All, I have a simple windows service application that connects
enter code here I have a ListView that have a different Layout XML for
enter code here My problem is this: in this database the junction table contains
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
Having strange problem with str_replace. Here's my code: function replace_text($text) { $array = array(
enter code here Maybe the title is not so specific. The situation which I'm

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.