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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:30:08+00:00 2026-05-31T21:30:08+00:00

The goal: run some functions on .ajaxStart() but only if fired by a certain

  • 0

The goal: run some functions on .ajaxStart() but only if fired by a certain event.

The code:

$('#loading_indicator').ajaxStart(function() {
    if(event != null){
            if(event.type == 'hashchange' || event.type == 'DOMContentLoaded'){
                $(this).show();
                $('#acontents').hide();
                $(this).ajaxComplete(function() {
                    $(this).hide();
                    $('#acontents').show();
                    bindClickOnTable();
                    initFilterInput();
                });
            }
    }
});

The problem: This does not work in Firefox. In Internet Explorer and Chrome I can happily access the event object without passing it to the .ajaxStart(function(). In Firefox however, the event object is undefined.

The obvious but incorrect solution: pass the event object to the function. this will not work because it will pass the ajaxStart event and my checks will not work anymore.

The question: How do I make the global event object accessible within this 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-31T21:30:10+00:00Added an answer on May 31, 2026 at 9:30 pm

    You can store event Object in any variable than can use in other function.

    Here is the demo : http://jsfiddle.net/cVDbp/

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

Sidebar

Related Questions

I wrote some jQuery code in an external file, with the goal to match
I have maven-plagin and need to run goal, that should automatically run before plugin.
We're using the Maven exec:java goal to run a custom java application that configures
My final goal is to write the program which can run on the Unix
goal: I have the string 1234432144 I want to only replace the first 2
I have such template functions: template<class R> list<R> f(const boost::function<R()>&); template<class R, class A0>
My goal is to put some complex logic in an if() statement. Let's say
In benchmarking some Java code on a Solaris SPARC box, I noticed that the
I am doing some twitter authentication in classic asp (I know, but I can't
I tried using the boost deadline_timer in this simple test application, but had some

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.