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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:52:36+00:00 2026-06-01T22:52:36+00:00

I have a notifications setup which perodically retrieves notifications from a database via an

  • 0

I have a notifications setup which perodically retrieves notifications from a database via an AJAX call.

If notifications are new, then I want to add a jQuery UI “highlight” effect to the notification containing element.

There are lots of these for different notification types.

as the notifications are loaded in, the elements containing the notification data is giving a new class “flashAlert” where required. The function below is then triggered.

function startAlert() { // this function makes alerts flash
    setInterval(function () {
       $('.flashAlert').effect("highlight", {}, 2500);
    }, 2500);    
};

This works, however, if the class “flashAlert” is removed from the element (done by a ‘clear notifications’ function), the effect is still applied.

I know that I could call clearInterval in my “clear notifications” function, but then I have to set up a separate Interval function for every notification rather than a single function like this.

I’ve seen other questions on here with users finding difficulties having the effect working on elements which are added by jQuery, but nothing about removing the effect!

Doing a page reload clears it, but that’s not what I want!

  • 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-01T22:52:38+00:00Added an answer on June 1, 2026 at 10:52 pm
    function startAlert(){
        $('.flashAlert').effect("highlight", {}, 2500, startAlert);
    }
    

    And when you want it to stop in your clear notifications, simply do:

    $('.flashAlert').removeClass("flashalert").stop();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java servlet from which I need to send few notifications to
I have a web app (.NET 3.5) which is sending notifications by email to
I have created an activity which sends a number of notifications to status bar.
The setup: I have a singleton data access manager object, call it Manager. I
I have setup two timers in my application which both repeats every a few
I have setup google checkout for my java web application and I want to
I have created one windows service which send an email notifications to users (list
i currently have a Java Observer/Observable setup in which i switch on some field
I am integrating django_paypal with my django_registration setup for which I have created a
I have a Job setup in SQL Server 2008 which sends a notification email

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.