SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: slider timing

  1. #1
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    slider timing

    Hi all,
    I have a jquery slider in a template that I am using, I have some CSS and HTML knowledge, but my jquery is minimal. How do i slow down the slider? I am presuming it is in the jquery code but which timing #'s do I change?
    Thanks in advance,
    M.

  2. #2
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,414
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    Hi,

    There is often a parameter that you can pass to the slider upon initialization which determines at what interval the picture changes.
    Is it possible to post a link to the page where I can see the slider in question?
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

  3. #3
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is a HTML template: http://www.flashmint.com/show-template-4230.html I don't have my site up yet. Thanks for the help.
    M.

  4. #4
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,414
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    Hi there,
    I don't see a slider on that page.
    Do you mean the siding images grid on the demo page?
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

  5. #5
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, If you view the demo it is the slider on the home page.
    Thanks,
    M.

  6. #6
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,414
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    Hi,

    There is no easy way to do what you want, I'm afraid.
    The slider on the demo page is embedded in an iframe.
    The iframe is located here: http://demo.themedev.me/site_templates/indelight/
    If you pull that page apart, you can see a script called "script.js" being referenced.

    The timing of the slider is controlled by this bit of code in script.js:

    Code JavaScript:
    function run_slider1() {
    	slider_height = $('.main_slider').height();
    	slider_hid_height = slider_height - $('.main_slider_hidder').height()-img_height;
    	$('.main_slider').animate({left : max_slider_left+'px'},1000);
    	setTimeout("$('.main_slider').animate({top: '-'+slider_hid_height+'px'},500)",3000);
    	setTimeout("$('.main_slider').animate({left: '0px'},1000)",5000);
    	setTimeout("$('.main_slider').animate({top : '0px'},500)",8000);
    }

    Try playing around with the numbers to see what effect they have.
    I tried doubling all of them and this seemed to slow things down to a considerably less hectic speed.

    Not sure if this helps ...
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

  7. #7
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help I will try it out!
    M.

  8. #8
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,414
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    You're welcome
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

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
  •