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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:04:25+00:00 2026-06-11T20:04:25+00:00

I have 2 divs in an HTML page -that need refreshing when an event

  • 0

I have 2 divs in an HTML page -that need refreshing when an event is triggered.
One of the divs, if display:none and will not refresh with the new data.

Is it not possible to refresh display:none divs?
My JavaScript is below,

$('#messages_send').live('click', function() {
$.ajax({
    url: base_url + 'ajax/send_message',
    data: {
        username: $('#messages_username').val(),
        message: $('#messages_message').val(),
        saveid: $('#messages_savedid').val(),
    },
    success: function(data) {
        sending_message();

        var x = jQuery.parseJSON(data);

        if(x) {
            if(x.gp_id==80)
            {
                    $('#spn_ucredit').load(base_url + 'ajax/userdata/credits');
                    $('#overlay_credits').load(base_url + 'ajax/userdata/credits');
            }
        }
        //$('#spn_ucredit').html($('#ncd_id').val());
        //tmp_cost = $('#spn_ucredit').html()-$('#ncd_id').val();
        //$('#ncd_id').val($('#ncd_id').val()-tmp_cost);
        //alert(data);
        setTimeout(message_sent, 2000);
        setTimeout(remove_modal_box, 3000);
        setTimeout(message_revert, 3500);
        $("#saved_messages").load(base_url + 'messages #saved_messages > form');
        //setTimeout($("#messages_content").load(base_url + 'messages #messages_content > form'), 1000);
        //$.get(base_url + 'messages #saved_messages > form', null, function(result){ $("#saved_messages").html(result) });
        //$("#messages_content").css("visibility","hidden").show();
        //$.get(base_url + 'messages #messages_content > form', null, function(result){ $("#messages_content").html(result) });
        //$("#messages_content").css("visibility","visible").hide();
    }
});

return false;

});

  • 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-11T20:04:26+00:00Added an answer on June 11, 2026 at 8:04 pm

    using .hide() lets a div be edited , while setting display:none makes it a lot harder

    “The matched elements will be hidden immediately, with no animation. This is roughly equivalent to calling .css(‘display’, ‘none’), except that the value of the display property is saved in jQuery’s data cache so that display can later be restored to its initial value. If an element has a display value of inline, then is hidden and shown, it will once again be displayed inline.”

    So if it’s important that you’re able to revert to the previous value of display, you’d better use hide() because that way the previous state is remembered. Apart from that there’s no difference.

    from resource on jQuery’s .hide() Here

    Also , there are SO questions on this as well – Here’s an example of one

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

Sidebar

Related Questions

I have a page that has three divs one at the top, one at
I'm trying to check the page and find the divs that do not have
I have an html page that has many elements (tables, divs e.t.c) I get
I have a page with several .desc divs. I want to add some html
I have a html like this: The idea is that divs are floated left
I have divs that I want to display at specific times throughout the day.
I have an HTML web page full of divs and span tags identified with
I have an HTML file that has a set of divs with the class
I have a page that requires 2 divs to get fixed position once certain
I have a page which has DIVs which contain short phrases (one-two words) of

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.