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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:10:56+00:00 2026-05-27T03:10:56+00:00

I am trying to $(destino).load(‘all.html #reservas_1’,function(){ console.log(‘cargado!’); alert($(destino).html()); //the alerts shows HTML }).show(); And

  • 0

I am trying to

$(destino).load('all.html #reservas_1',function(){
                console.log('cargado!');
                alert($(destino).html()); //the alerts shows HTML
}).show();

And it works fine,

But the incoming html code is wrapped by a <div class="content"> which has a display none so I am trying

$(destino).load('all.html #reservas_1 .content',function(){
                console.log('cargado!');
                alert($(destino).html());   //the alert shows black string
        }).show();

Any idea why? Is it because I am using a class as selector or is that I can’t load a subtarget?

  • 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-27T03:10:56+00:00Added an answer on May 27, 2026 at 3:10 am

    Probably you need to update html after loading:

    $(destino).load('all.html #reservas_1',function(){
                //$(destino).find('.content').unwrap();
                $(destino).html($(destino).find('.content').html());
                alert($(destino).html());   //the alert shows black string
        }).show();
    

    It looks like it allows to use only selector by ID becuase it means that it should be only one element with id on the requested page (by html specification it shouldn’t be 2 elements with the same ID). So, if you will use more complex selectiors it can return array of elements and jQuery don’t know how to merge all of them.

    jQuery uses the browser’s .innerHTML property to parse the retrieved document and insert it into the current document.

    You can’t get html in such way if you will have array of elements.

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

Sidebar

Related Questions

I'm trying to redraw a GtkDrawingArea using the gtk_widget_queue_draw function, but the widget is
Trying to use log4j's built-in JMSAppender to log messages to a local message queue
Trying to keep all the presentation stuff in the xhtml on this project and
Trying to load a page fragment, or at least jump to a div but
Trying to read registry keys remotly (from a host on local intranet)... All the
trying to get my first HTML/CSS uni assignment sorted but have become a bit
Trying to get page-load time down. I followed the third example outlined here to
Trying to build out an exception if move.UserId does not equal currentUserId then Redirect
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to figure out how I can do this properly. The print_r looks like

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.