SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I add this?? [Cycle Plugin]

    I have this now,

    Code javascript:
    $('#ecommerce').cycle({
        fx:    'fade', 
        speed:  1000 ,
     
        // duration of slide
        timeout: 5000, 
        // pause on hover
        pause:  1
     });

    and I'm trying to stop the cycle. On the Cycle Plugin page this is the example used
    Code javascript:
    $('#slideshow').cycle('stop');

    but don't know how I would get that in there with everything else I have.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It would not be a change to your code which starts the cycle, but attached to whatever you want to make it stop.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    It would not be a change to your code which starts the cycle, but attached to whatever you want to make it stop.
    Is this the only way? I tried it like that
    Code javascript:
    $('#ecommerce').cycle({
        fx:    'fade', 
        speed:  1000 ,
     
        // duration of slide
        timeout: 5000, 
        // pause on hover
        pause:  1
     });
     $('#ecommerce').cycle('stop');

    but it doesnt loop at all.. is this the only way?

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That would make it stop immediately after it starts. What are you trying to achieve?

  5. #5
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    That would make it stop immediately after it starts. What are you trying to achieve?
    I'm trying to have it play the rotation once, then stop

  6. #6
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Did I find the right "cycle plugin"?

    http://malsup.com/jquery/cycle/options.html

    Stop after 5 transitions:

    Code:
    $('#ecommerce').cycle({
        fx:    'fade',
        speed:  1000 ,
        // duration of slide
        timeout: 5000,
        // pause on hover
        pause:  1,
        autostop: 1,
        autostopCount = 5
     });


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •