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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:35:18+00:00 2026-05-20T06:35:18+00:00

I’m doing fancy ajaxy dhtml stuff with caching. After I ajax-download a page of

  • 0

I’m doing fancy ajaxy dhtml stuff with caching. After I ajax-download a page of interest, I store the contents in an array of variables

HistoryCache[url].load(url, handleRSX);

(this part works fine)

Afterwards I perform a link-fixer:

$('a', HistoryCache[url]).click(...)

Where ... is the code that converts a normal link to my ajaxy calling.

After all this is done I need to .append() my new content to a div that’s specifically made to hold the new stuff. Prior to appending I .remove() whatever contents were there before.

Problem: When the requested URL is in my HistoryCache I do not .load() it, and I do not fix the links via .click(). I simply take the contents in the cache and put it in my holder. At this point the links are not fixed, and actually change the browser to the intended link rather than calling my function.

Question: Why does the .click() not remain in the stored cache array after its been .removed() and re .append()ed?


Forgot to mention that I have resolved this by changing my click override to the native HTML’s this.onclick = function... instead of $(this).click(function(){});

  • 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-20T06:35:19+00:00Added an answer on May 20, 2026 at 6:35 am

    On .remove() all attached jQuery events are intentionally removed to prevent memory leaks. If this weren’t done jQuery would leak memory in a bad way.

    To work around this with jQuery you can use .live() or .delegate(). Both work by propagating events further up the DOM than your bound element (the document in the case of live and the element specified in the case of delegate) and will work after remove and add.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have an array which has BIG numbers and small numbers in it. I
i got an object with contents of html markup in it, for example: string
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display

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.