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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:19:07+00:00 2026-05-16T10:19:07+00:00

Hello world. × jQuery $(‘#closeerrordiv’).click(function() { $(this).parent().animate({opacity: 0}, ‘slow’, function() { $(‘#regWarnMsg’).slideUp(‘slow’); }); });

  • 0

Hello world.
×

jQuery

  $('#closeerrordiv').click(function() {
      $(this).parent().animate({opacity: 0}, 'slow', function() {
        $('#regWarnMsg').slideUp('slow');
      });
  });   


  $('#regWarnMsg').text(responseText.msg);
  $('#regWarnMsg').show('slow');

When the user clicks #closeerrordiv, the #regWarnMsg is closed.

Q1> Later, I need to force to show the #regWarnMsg. I don’t know why the child (i.e. #closeerrordiv) of #regWarnMsg doesn’t show up at the same time.

Q2> Why the text doesn’t show up either?

Thank you

  • 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-16T10:19:08+00:00Added an answer on May 16, 2026 at 10:19 am

    When you call .text you are replacing the current Hello world in #regWarnMsg with your responseText.msg. It is also removing everything including your span and the anchor tag within it.

    You can try something like this:

    <div id="regWarnMsg">
        <span id="errorText">Hello world.</span>
        <span id="closeerrordiv"><a>×</a></span>
      </div>
    

    jQuery

        $('#closeerrordiv').click(function() {
              $(this).parent().animate({opacity: 0}, 'slow', function() {
                $('#regWarnMsg').slideUp('slow');
              });
          });   
    
    
      $('#errorText').text(responseText.msg);
      $('#regWarnMsg').show('slow');
    

    You are now only replacing the text within #errorText, which will keep the closing anchor tag in place.

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

Sidebar

Related Questions

I have this simple jQuery code $(document).ready(function() { $('#test').attr('value','hello world'); $('#test1').text('hello world'); }); And
<div id=main> hello world <div id=second-div> bye </div> </div> jQuery('#main:not(second-div)').click(function() { alert('works!'); }); I
I have the following code jQuery.getJSON(encodeURI(strUrl), {address:address,state:state, zip:zip},function(data){ alert('HELLO World!'); }); If for some
Jquery has a great language construct that looks like this: $(document).ready(function() { $(a).click(function() {
How could I achieve the following: document.all.regTitle.innerHTML = 'Hello World'; Using jQuery where regTitle
I use jquery to fill a asp:label Jquery code: $(#more15).text(<p> <b>Hello WOrld!</b> </p>); Asp
The following link_to_function works: <%= link_to_function click, alert(Hallo world! %> However, with jquery, the
I want to insert TAB characters inside a TEXTAREA, like this: <textarea>{KEYPRESS-INSERTS-TAB-HERE}Hello World</textarea> I
Getting started with jquery and having trouble getting hello world type example going for
<script type=text/javascript src=https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js></script> <script type=text/javascript> function foo() { $(this).parent('li').append('hello world'); } </script> <ul> <li><img

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.