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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:45:00+00:00 2026-06-09T15:45:00+00:00

I am loading some text from a database via $.post. Sometimes on page load

  • 0

I am loading some text from a database via $.post. Sometimes on page load the screen is just blank, when I inspect element the div it is set to <div id="#panel" style="display:none">, I don’t know why this is happening, though before the $.post I am fading out the div and when the $.post gets an output, I bring back the div.

$('#panel').html(output).show();

I am using $("#panel").fadeOut(100); so I can make my loading.gif work.

Is there any way to check if #panel’s style is set to display:none and if it is, then remove it.

Thanks.

EDIT: My function I call on checkbox change and page load

$("#loading").show();
$("#panel").fadeOut(100);
$('#options :input').prop('disabled', true);
$('#loading').html("<img src='loading.gif'>"); 
var langSelected = $('input[name=text]:checked').map(function() {return $(this).parent().text();}).get().join(",");

$.post('http://mywebsite.com/data.php', { value: languages.url.value, mycheckboxes: langSelected},
function(output) {
    $('#panel').html(output).show(); 
    $('#loading').hide();
    $('#options :input').removeAttr('disabled');

});
  • 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-09T15:45:02+00:00Added an answer on June 9, 2026 at 3:45 pm

    Try this:

    if ($('#panel').is(':hidden')) {
         $('#panel').remove()
    }
    

    or:

    $('#panel:hidden').remove()
    

    However instead of removing the div you can use the error method:

    $.post("example.php", function() {
          // success
    }).error(function() { 
          $('#panel').show()
          // error
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to load some text (shader code) from a file that is placed
I'm loading some help text from a plist and displaying the same in the
I am loading some text dynamically into a div, but have the problem that
I'm loading some HTML via Ajax with this format: <div id=div1> ... some content
I'm loading some feeds and displaying them as links on my site page. When
In one of my HTML page dynamically loading some file field while clicking a
In my application, I'm loading some data from a file. This can fail and
Let's say I do this: $(#content).load(...); Within what I'm loading some javascript is included:
I'm loading in some HTML content like this: $('#scores').load('scores.php #scores'); Note that It is
Using FullCalendar ( http://arshaw.com/fullcalendar/ ) to pull events from a MySQL database table via

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.