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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:30:54+00:00 2026-05-28T14:30:54+00:00

I am attempting to query a db row every n seconds to see if

  • 0

I am attempting to query a db row every n seconds to see if a value has changed, then based that value I want to build a class that I can apply to a div in my page.

I can currently echo out the slide number, i have this

echo("The current slide number is: ".$currentSlideNbr);

but am not sure how to query every n seconds and then add .$currentSlideNbr to my class name with jquery

Thanks in advance

  • 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-28T14:30:54+00:00Added an answer on May 28, 2026 at 2:30 pm

    here’s a simple javascript example that will trigger every n second(s)

        var n = 1000; // 1 sec
        var interval = setInterval(function() {
            $.ajax({
                url: 'your url',
                method: 'get',
                success: function(data) {
                    $("#someelement").addClass(data);
                }
            });
        }, n);
    

    if you want to stop the process at any time you can do

    clearInterval(interval);
    

    not that data should only contain the classname you like to add. So not

    echo("The current slide number is: ".$currentSlideNbr);
    

    but

    echo($currentSlideNbr);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the situation: I’m attempting to build a query with criteria based on
I have a search query that I'm inheriting and attempting to optimize. I am
I am attempting to pass a text box value into a SQL query, something
I have a Premiums table that I attempting to query using the following LINQ-to-SQL:
I'm attempting to set a row value to 1 when it is the only
I'm attempting to build a search stored procedure. I want to search multiple tables
I'm attempting to write a query that will return The most recent AccountDate with
I am attempting to query my table which has the schema: CREATE TABLE [dbo].[FIN_MeetingDisplay-DefaultConfig](
I am attempting to use Linq to project each row from a DB query
I have a query that I am currently getting the ORA-01427: single-row subquery returns

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.