سؤال

this is my first post on stackoverflow, so please let me know if I've asked my question correctly, and if my terminology is incorrect at any point. Thank you.

I'm using jQuery and the Cycle plugin. I have about 18 images that rotate with no delay. You can view a working example of this here: (http://dev.ctsciencecenter.org/freeze-frame/).

I'm attempting to change the 'speed' value, eventually with a jQuery UI slider, but for now with a link and the .click function.

Here is the Cycle function:

$('#slideshow').cycle({
    fx:     'none',
    timeout: 1,
    continuation: 1,
    speed: 'fast'
});

I would like to change the 'speed' value to 'slow' when a link with the id #example is clicked.

I really appreciate the help, could you please also tell me the term for properties like 'speed' and 'fx', are these called 'Object Properties?".

هل كانت مفيدة؟

المحلول

Let me know if this is what you are looking for:

$(function () {
    $('#slideshow').cycle({
        fx: 'none',
        timeout: 1,
        continuation: 1,
        speed: 'fast'
    });
    $('#example').click(function (e) {
        e.preventDefault();
        $('#slideshow').unbind();
        $('#slideshow').cycle({
            fx: 'none',
            timeout: 1,
            continuation: 1,
            speed: 'slow'
        });
    });
});
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top