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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:57:11+00:00 2026-06-15T20:57:11+00:00

I want to change the options for jquery cycle dynamically on the page. Specifically,

  • 0

I want to change the options for jquery cycle dynamically on the page. Specifically, I want the speed to drop. According to one of it’s creator, you can use ‘cycle.opts’ to do this. In my example I have specifically

$('.cycle-streams').cycle({
    fx: 'scrollVert',
    continuous: 1,
    speed: 1000,
    delay: 0,
    easing: 'linear'
});

var changedOpts = $('.cycle-streams').data('cycle.opts');

$('.cycle-streams').mouseover(function() {
    var changedOpts = $('.cycle-streams').data('cycle.opts');
    changedOpts.speed = 1000000000000;
    $('.cycle-streams').data('cycle.opts', changedOpts);
});

I’ve been working on this for some time now and am lost as to what I’m doing wrong. Any help would be appreciated. The jsfiddle is here… http://jsfiddle.net/bmXgj/

  • 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-15T20:57:12+00:00Added an answer on June 15, 2026 at 8:57 pm

    I changed your fiddle to this:

    var changedOpts = $('.cycle-streams').data('cycle.opts');
    
    $('.cycle-streams').mouseover(function() {
        //hover in
        $('.cycle-streams').cycle('pause');
        changedOpts.speedIn = 500;
        changedOpts.speedOut = 500;
        $('.cycle-streams').cycle('next');
        $('.cycle-streams').cycle('resume');   
    });
    
    $('.cycle-streams').mouseout(function() {
        //hover out
        $('.cycle-streams').cycle('pause');
        changedOpts.speedIn = 3000;
        changedOpts.speedOut = 3000;
        //$('.cycle-streams').cycle('next');
        $('.cycle-streams').cycle('resume');
    });​
    

    I noticed that you were re-declaring ‘changedOpts’ for some reason. When I watched this variable in the console, it was coming out as undefined. Since you already defined it I just kept using it.

    also you were never resetting the state of the cycle. I added pause and resume. It appears to work now but it is not perfect. The last side needs to clear before the new speeds will be used, so drastic jumps (3000 to 500 for example) allow for a noticeable delay when trying to speed up. I also added a next statement.

    I noticed that when the plugin was handling next it was clearing the timeouts. So I figured if I stored the remaining time (Pause), then moved to the next slide (next), then resumed the show (resume) that the time would be restored. This seems to be working.

    The ‘next’ action, is not needed when going from fast to slow because you will not usually notice the ‘orphan’ slide when leaving the container because it is cycling quickly. I put it in there for good measure in case your speeds are not that far apart.

    Also I noticed you were only changing one speed. I am assuming, without looking at the guts of the plugin, that the ‘speed’ option is used at initialization only. After adding the other two speeds I got the right action. After reviewing the ‘guts’ of the plugin, I am certain that the speed option is used for synchronizing the other two speeds. If they all do not match you may get out of sync. The initialization code uses the ‘speed’ to set ‘speedIn’ and ‘speedOut’, so we need to change those two to affect the ‘running’ speed.

    http://jsfiddle.net/bmXgj/6/

    EDIT: did not need to pause and resume.

    EDIT2: I did need the pause and resume, but I also needed a next. Also the ‘speed’ option can be ignored once it is set the first time to start the cycle. It appears to be shorthand for speedIn = speedOut = X

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

Sidebar

Related Questions

I have 2 select options. I want to change the drop down options in
I want to use javascript to change all of the <option> tags to <a>
I want change following javascript code to jquery code, How is it? With done
I know one can set plugin options, after things are set. But I'm not
I´m working in a jQuery pluging, and i have one error, i want modify
I want my select box to dynamically change the CSS of another part of
I want to change the effects of sliding images on selection of drop down
I am modifying a jQuery calendar and want to change this code: function getEventData()
I've recently discovered the jQuery cycle option that I would like to use for
I want to change the default behavior for the jquery.validate.unobtrusive.js I want to be

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.