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

Vertical navigation #60

Closed
Voxeler opened this issue Nov 9, 2014 · 2 comments
Closed

Vertical navigation #60

Voxeler opened this issue Nov 9, 2014 · 2 comments

Comments

@Voxeler
Copy link

Voxeler commented Nov 9, 2014

Hello!
I'm trying to create a vertical navigation menu with prev \ next buttons.

$('#next').click(function() {
slider.setStep(slider.getStep()[0] + 1);
return false;
});
$('#prev').click(function() {
slider.setStep(slider.getStep()[0] - 1);
return false;
});

Horizontal version works fine, but the vertical

$('#next').click(function() {
slider.setStep(slider.getStep()[1] + 1);
return false;
});
$('#prev').click(function() {
slider.setStep(slider.getStep()[1] - 1);
return false;
});

is not working at all.

How can I specify the position in that case

slider.setStep(slider.getStep()[0] + 1);
or
slider.setStep(slider.getStep()[1] + 1);

for y only?

Thank's!

@ovidiuch
Copy link
Owner

@Voxeler the vertical value is always the 2nd value, both in getStep and setStep. This should work:

$('#next').click(function() {
  slider.setStep(1, slider.getStep()[1] + 1);
  return false;
});
$('#prev').click(function() {
  slider.setStep(1, slider.getStep()[1] - 1);
  return false;
});

@Voxeler
Copy link
Author

Voxeler commented Dec 2, 2014

I found this solution. Thanks!

@Voxeler Voxeler closed this as completed Dec 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants