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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:05:25+00:00 2026-05-28T22:05:25+00:00

I am having a problem using the jQuery cycle plugin. On my page, I

  • 0

I am having a problem using the jQuery cycle plugin. On my page, I use it for image and text slideshows. The image slideshows work very well but one of the text slideshow is having a problem. Consider the code below. I am using the divs below as slides for the text slideshow.

<div>
    <p>This is slide1</p>
    <h4>author 1</h4>
</div>
<div>
    <p>This is slide2</p>
    <h4>author 2</h4>
</div>

If I use the code above as a static block in an HTML page, the slideshow works fine. However, if I generate the above piece of code through Javascript, I am getting an error. Here’s what the Chrome console is giving me.

Cannot read property ‘cycleW’ of undefined

I am not able to figure out what this problem is, so any help would be really appreciated. 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-28T22:05:26+00:00Added an answer on May 28, 2026 at 10:05 pm

    I ran into the same problem as you, and prevailing theories seem to be right – the cycle plugin is trying to parse the slides before the DOM has finished loading. To solve the problem I had to create a sceond function that would wait for the div to finish loading before it would start cycling, like so:

    function startSlideshow(id, timeout) {
        var children = $("#" + id).children().size();
        // child div loaded yet?
        if (children <= 0) {
                // no! wait for it
                setTimeout("startSlideshow('" + id + "', '" + timeout + "')", timeout);
        }
        else {
                // yes, start the cycle plugin
                $("#" + id).cycle({ 
                        fx: 'fade',
                        timeout:  timeout,
                        speed: 500
                });
        }
    }
    

    So when I make an AJAX call to load the divs, I do it like so:

    // load divs with multiple ajax calls
    addRandomImages("slideshow");
    addRandomImages("slideshow");
    addRandomImages("slideshow");
    // start the slideshow when the divs are loaded
    startSlideshow("slideshow", 5000)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Bit of a newb but just having a small problem using jquery cycle all
i'm having a problem using the scrolltofixed jquery plugin https://github.com/bigspotteddog/ScrollToFixed i use: $('#tostick').scrollToFixed({ limit:
I am having problem getting my tooltip to work when using the jQuery load()
I'm having a problem where a slideshow (using jQuery Cycle) gets rendered in front
I'm using jQuery Typewatch but it's no longer maintained and I'm having a problem
I'm having some problems with a content slider. I am using the jQuery.Cycle plugin
I am having a small problem with the jQuery cycle plugin and its timeout.
I am using the jQuery UI components but having some problems. If I try
I'm having a problem using the java.text.MessageFormat object. I'm trying to create SQL insert
I'm having a problem using CSS's display:inline property with the list-style-image: property on <li>

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.