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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:33:49+00:00 2026-06-09T17:33:49+00:00

I have this following code on my site : <script type=text/javascript> $(document).ready(function(){ $(‘.notif-email >

  • 0

I have this following code on my site :

<script type="text/javascript">
  $(document).ready(function(){
      $('.notif-email > a').click(function(e) {
            $("#email-notif").load("notif-email.php");
      });
      $('.notif-message > a').click(function(e) {
            $("#message-notif").load("notif-message.php");
      });
      $('.notif-prospect > a').click(function(e) {
            $("#prospect-notif").load("notif-prospect.php");
      });
  });
</script>

and I want to add some loading effect with GIF animated file, let’s say… loading.gif and I want to show it to user after they ‘Click’ something but still waiting for load() file to be executed on the server.

how to do that?

UPDATE :

here’s more code associates with that jQuery script :

<li class="notif-email"><a href="#" title="17 new emails">View New Emails</a>
<div class="popup-notif">
<div class="notif-top">
<div class="notif-title">Notifications</div>
</div><!-- .notif-top -->
<div class="notif-body">
<div id="email-notif" class="notif-child-wrap">
</div><!-- .notif-child-wrap -->
</div><!-- .notif-body -->
</div><!-- .popup-notif -->
</li>

<li class="notif-message"><a href="#" title="5 new messages">View New Messages</a>
<div class="popup-notif">
<div class="notif-top">
<div class="notif-title">Messages</div>
</div><!-- .notif-top -->
<div class="notif-body">
<div id="message-notif" class="notif-child-wrap">    
</div><!-- .notif-child-wrap -->
</div><!-- .notif-body -->
</div><!-- .popup-notif -->
</li>

<li class="notif-prospect"><a href="#" title="1,999 new prospects">View New Prospects</a>
<div class="popup-notif">
<div class="notif-top">
<div class="notif-title">New Prospects</div>
</div><!-- .notif-top -->
<div class="notif-body">
<div id="prospect-notif" class="notif-child-wrap">    
</div><!-- .notif-child-wrap -->
</div><!-- .notif-body -->
</div><!-- .popup-notif -->
</li>
  • 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-09T17:33:51+00:00Added an answer on June 9, 2026 at 5:33 pm
    function togglemask(show) {
      if(show)
       $('#target').append('<img class="loadergif" src="loading.gif" width="" height="">');
      else
       $('#target').remove('img.loadergif');
    }
    
    $(document).ready(function(){
          $('.notif-email > a').click(function(e) {
                togglemask(true);
                $("#email-notif").load("notif-email.php", togglemask(false));
          });
          $('.notif-message > a').click(function(e) {
                togglemask(true);
                $("#message-notif").load("notif-message.php", togglemask(false));
          });
          $('.notif-prospect > a').click(function(e) {
                togglemask(true);
                $("#prospect-notif").load("notif-prospect.php", togglemask(false));
          });
      });
    

    Note

    Here #target is just for example. you can use any element to add that.

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

Sidebar

Related Questions

I have a file- Site.js with the following method: function Init() { $(document).ready(function() {
I have the following code snippet: using (SPSite site = new SPSite(this.ListAddress)) { using
From this site: http://www.toymaker.info/Games/html/vertex_shaders.html We have the following code snippet: // transformations provided by
I have this following code, here CssClass is of the String type. <asp:Panel ID=Panel1
I have this following jquery text fly-in animation.Here is my code before I explain
I have following PHP code $filename = 'a56.flv'; $file = C:/xampp/htdocs/site/flv/a56.flv; header(Content-Type: application/force-download); header('Content-Type:
I have the following JS code on my site: function foo(link) { alert('ID=' +
I have this following code which will return all the current semesters. How do
Never thought I'd have this problem :) The following snippet of code works in
I have the following code: Parallel.ForEach(this.listView2.CheckedItems, new ParallelOptions { MaxDegreeOfParallelism = 4 }, (CheckedItem)

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.