Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continues sliding? #12

Closed
Jaspur opened this issue Nov 19, 2013 · 5 comments
Closed

Continues sliding? #12

Jaspur opened this issue Nov 19, 2013 · 5 comments
Labels

Comments

@Jaspur
Copy link

Jaspur commented Nov 19, 2013

Nice script, but is there a way to let the slidr keep on sliding? Now it stops after all slides went by. I have the a auto(3000) already.

@bchanx
Copy link
Owner

bchanx commented Nov 19, 2013

Hey @Jaspur, you'll have to do a little custom work in javascript to add the slides manually for continuous sliding.

Check out this jsfiddle, and also the example at http://bchanx.com/slidr#javascript (right underneath the Slidr API section) for more details!

@Jaspur
Copy link
Author

Jaspur commented Nov 19, 2013

Then it stills stops.
I have

<script>
    slidr.create('slidr-img', {
        breadcrumbs: false,
        controls: 'none',
        overflow: true,
        timing: { 'fade': '0.5s ease-in' },
        transition: 'linear'
    }).auto(3000).start();
</script>

@bchanx
Copy link
Owner

bchanx commented Nov 20, 2013

As mentioned earlier, you'll need to call .add() after .create() and manually set up the order of the slides, so it can loop indefinitely. The extra repeated 'one' links the last slide back to the first.

<script>
    slidr.create('slidr-img', {
        breadcrumbs: false,
        controls: 'none',
        overflow: true,
        timing: { 'fade': '0.5s ease-in' },
        transition: 'linear'
    }).add('h', ['one', 'two', 'three', 'one']).auto(3000);
</script>

@bchanx bchanx closed this as completed Nov 28, 2013
@samlinux
Copy link

samlinux commented Sep 3, 2014

i have the same problem, the slider runs once and stops at the last position. tested on chrome current version!

@samlinux
Copy link

samlinux commented Sep 3, 2014

I use the following:

var s = slidr.create('slidr-img', {
    //after: function(e) { console.log('in: ' + e.in.slidr); },
    //before: function(e) { console.log('out: ' + e.out.slidr); },
    breadcrumbs: false,
    controls: 'none',
    direction: 'vertical',
    fade: false,
    keyboard: true,
    overflow: true,
    pause: false,
    theme: '#222',
    timing: { 'cube': '0.5s ease-in' },
    touch: true,
    transition: 'cube'
}).add('h',['1','2','3','1'],'cube').auto(5000);

and it works but only with the h option. If you use the v option by the add() the slider doesn't starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants