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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:09:06+00:00 2026-06-03T07:09:06+00:00

I have read a ton before posting this and tried what i could to

  • 0

I have read a ton before posting this and tried what i could to get it to work. SO basically I am trying to use ajaxStop() as a sort of hook to do stuff after all other jQuery ajax requests have been loaded so I can manipulate and add more to it.

But It seems when I do use ajaxStop() it seems to execute my additional added on requests multiple times…

Now after a bit of trial and error. I learned that this is because within my ajaxStop() function I am calling another ajax post to grab data once something has been clicked, to populate a pop up. I need this click event handler to be registered after all other ajax has been loaded… Because if I take it out of the ajaxStop() method the multiplicity error goes away but if I refresh the content via ajax than the click event doesn’t register anymore. I am most likely going about this wrong but could use some help. It’s getting late and my brain hurts so I’ll take a fresh look at it tomorrow.

jQuery('.content').one('ajaxStop', function() {

 setInterval(doPopUpOptionsMenu , 1000);
 return false;

 });

Inside of doPopUpOptionsMenu is another ajax call to grab the content for the option pop up.

  function doPopUpOptionsMenu() {
 jQuery(".activity-popUpMenu").one('click',function(e) {
 var activityId = jQuery(this).parent().attr('id').split('-');
 //code to grab options and show the user the Options box.

   jQuery("#optionsPopUpContainer").css({'display': 'block', 'position' :'absolute',   'top' : e.pageY , 'left' : e.pageX});
var myAjaxURL = "example.com";
  var jqxhr = jQuery.post(myAjaxURL, { menuOptions : true, id : activityId[1] } ,     function($response) {
 jQuery("#optionsPopUpContainer").html($response);
})
.success(function() { alert("second success"); })
.error(function() { alert("error"); })
.complete(function() { alert("complete"); });

 });
 jQuery(".activity_update").hover(
 function(){
 jQuery(this).children('.activity-popUpMenu').addClass('activated');

 } ,
function() {
 jQuery(this).children('.activity-popUpMenu').removeClass('activated');
 //jQuery(".activity-popUpMenu").unbind('click');
  });

 }

now the alert for this pops up twice on the first click as it should once for success and once for complete. Than I click on the pop up options again and it pops up four alerts than eight than 16 and keeps doubling pop ups. Like I said I imagined this is due to ajax within the ajaxStop call but how can i get around it or do something better…?

  • 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-03T07:09:07+00:00Added an answer on June 3, 2026 at 7:09 am

    If you want to work with something after all ajax calls complete in the document use $(document).ajaxComplete(function(){handler}); It’s probably not the best approach but it does work pretty well if you want to listen for all ajax to finish.

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

Sidebar

Related Questions

I have read over this which sort of gives an explanation of when you'd
Before reading please note that I've googled this and read a ton of articles
I have read a ton about this problem, but I cannot figure it out.
I'm trying so send push notifications ton my iPhone (APNS). I read this post
I have read a lot about impersonation, and I have tried a ton of
I have read a ton of articles about how to store and compare entered
I have read that you can do it, but would this really improve performance
I have read this question but it's not quite what I was looking for.
I have asked aqbout timezones and date/time before but this is a more specific
I'm getting the maxStringCount is exceeded error, and have read a ton on fixing

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.