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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:14:37+00:00 2026-05-26T20:14:37+00:00

I am trying to simulate a click event on list items with the same

  • 0

I am trying to simulate a click event on list items with the same class, one at a time every few seconds. I have tried this many different ways. Using combinations of .each and delay() result in all clicks being triggered at the same time. I found someone with a similar question and the answer was to do the following…

            var elements = $(this).find('.slide');
            var index = 0;

            setTimeout(function () {
                $(elements).get(index).trigger("click");
                index++;
            }, 3000);

This gives me a js error every time and doesn’t seem to fill the array…maybe I’m missing something obvious…

Thanks

  • 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-26T20:14:38+00:00Added an answer on May 26, 2026 at 8:14 pm

    jQuery.fn.delay() only works for animations made with jQuery, there is no way of delaying code using the jQuery core as of yet. There, however, are plugins implementing setTimeout() and the likes into jQuery, but they don’t add much functionality over the original setTimeout().

    As for fixing your code 😉
    jQuery.fn.get() gets the actual HTMLDomElement, and it has no method .click(). (I expect that is the error you are getting.)
    Use jQuery.fn.eq() instead. Also, use setInterval() instead of setTimeout(), to make it work multiple times and then when all are “clicked”, clear the interval:

    var interval = setInterval(function () {
      elements.eq(index).trigger("click");
      index++;
      if(index == elements.size()){
        clearTimeout(interval);
      }
    }, 3000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to simulate a click event in AS3? I'm trying this:
I'm trying to simulate a mouse click on a window. I currently have success
I'm trying to simulate mouse click at window with JNA. public class App {
I am trying to simulate a scenario where connection to the server of one
I'm trying to simulate a click on an anchor tag using jQuery. I've been
I am trying to simulate a problem we have with a particular domain ID
My test case is @ Gmail, I am trying to simulate a click to
I have been trying to find a way to make a mouse click programmatically
Basically I'm trying to dispatch a custom made mouse click event to a text
Im trying to simulate a interface from a touchscreen phone, one function of the

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.