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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:07:25+00:00 2026-06-17T23:07:25+00:00

I am trying to load a specific portion of another web page via jQuery’s

  • 0

I am trying to load a specific portion of another web page via jQuery’s $.ajax request (that doesnt have an ID).

Simple example….

Here is example HTML:

<div id="list">
    <ul>
        <li>Foo 6</li>
        <li>Foo 7</li>
        <li>Foo 8</li>
        <li>Foo 9</li>
        <li>Foo 10</li>
    </ul>
</div>

And some example JQ:

$("#more").on("click", function(event){
    $.ajax({
        url: 'foo.html',
        datatype: 'html',
        success: function (data) {
            $('#list ul').append($(data).filter('#list').html());
        }
    })
    event.preventDefault();
});

However, I want to target the ul WITHIN the #list, but if I change the filter to be ‘#list ul’ nothing works. Its driving me crazy. How can I target this element? I tried using find instead of filter but that doesnt bring anything back either.

Cheers

  • 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-17T23:07:26+00:00Added an answer on June 17, 2026 at 11:07 pm

    filter() will only work if the target selector is at root level, otherwise you need to use find()

     $('#list ul').append($(data).find('#list ul').html());
    

    OR following would also work but doesn’t appear as efficient

    $('#list ul').append($(data).filter('#list').children('ul').html());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to load a specific page on a web browser control that
$([littleBox]).load(ajax.php?eid=+$(this).attr(littlebox)); the $(this).attr(little box) portion of the code returns undefined . I'm trying to
I am trying to load an external page as a popup using jquery fadeIn()
I have numerous iframes that load specific content on my pages. Both the parent
So i am trying to make a game that will load a specific XIB
Trying to bring in a specific DIV from a page called by the jQuery
i'm trying to load content specific to a page. I know using <?php if(is_front_page()
i am trying to load and initialize the addthis.com widget via ajax in order
I'm trying to implement a transparent cache that can load a specific object when
I have specific classes that i need to load. There name are stored in

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.