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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:57:32+00:00 2026-05-12T06:57:32+00:00

all I’m new to jQuery and I’m having a bit of a problem manipulating

  • 0

all I’m new to jQuery and I’m having a bit of a problem manipulating AJAX results with jQuery methods.

I use an AJAX get and execute the find method on the resulting output. But this seems to work only once. Subsequent attempts using the same selector in the find() argument don’t work. Different selectors will work, but again, only once.

There seems to be something going on when traversing the AJAX result?

AJAX call…

    $.get('sections.htm', {}, function(data) {
        var $response = $('<div />').html(data);
        showContent("teaser");

        function showContent(nav) {
            loadContent(nav);
            loadSlimboxHack();
            $('#content').fadeIn(400);
        }

Find element …

    function loadContent(nav) {
        if (nav == 'teaser')
        {
            $('#content').html($response.find('.teaser'));
        }

This works, but if I try showContent(".teaser") again, it fails because it doesn’t seem to find anything and so #content is overwritten with nothing.

Take a look at my website to see…

http://www.shadowshapes.com/dev

  • 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-12T06:57:32+00:00Added an answer on May 12, 2026 at 6:57 am

    @redsquare,
    Thanks very much! That put me on the right path.

    For the uninitiated, append() acts like a ‘move’ instead of a ‘copy’ in a single selector context. Apparently its a common mistake among newbies. And its not quite documented? I don’t feel so bad now! 🙂

    http://www.nabble.com/Undocumented-move-copy-behavior-of-append%28%29-et-al.-ts21179461s27240.html#a24146606

    So I needed to use clone() in addition to append() in this case.

    $('#content').append($response.find('div.concept' + tag).clone());
    

    Great! Problem solved!

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

Sidebar

Related Questions

All, I'm trying to use the jQuery Form Validator (http://docs.jquery.com/Plugins/Validation). However I'd like to
All my searches returned nothing and I find it odd that there aren't any
All I want is to get the website URL. Not the URL as taken
All, Say I have the following bit of code: select: function(start, end, allDay) {
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All the examples of use and tutorials I have found on beginBackgroundTaskWithExpirationHandler: show how
I want use html5's new tag to play a wav file (currently only supported
all. My question is in regards to a problem I'm encountering when trying to
All the info I've found on the internet about this says to use something
All I need this for is strcpy(). I want to see whether the first

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.