Lemmon-Slider icon indicating copy to clipboard operation
Lemmon-Slider copied to clipboard

Control over what a "page" is?

Open smlombardi opened this issue 12 years ago • 4 comments

I have a lemmon slider 1000 pixels wide on desktop, which displays 3 photos.

I have a button wired to "next page", but it slides 2 images over. Any idea how I can control how many slides constitutes a "page" so I might have all 3 slide off and be replaced by next 3?

smlombardi avatar Feb 12 '13 16:02 smlombardi

A page means an area containing full visible slides. If your 3rd image is not fully shown it is assigned to the next page.

There is also an event to slide to specific element:

$slider.trigger('slideTo', [4]); // slides to the 5th item (range: 0..n-1)
$slider.trigger('slideTo', [5, 'fast']); // define speed

lemmon avatar Feb 12 '13 16:02 lemmon

Thanks. Is there a way to get the index of the "current" slide, so that I can do "slideTo currentSlide+3"?

On Tue, Feb 12, 2013 at 11:38 AM, Lemmon [email protected] wrote:

A page means an area containing full visible slides. If your 3rd image is not fully shown it is assigned to the next page.

There is also an event to slide to specific element:

$slider.trigger('slideTo', [4]); // slides to the 5th item (range: 0..n-1)$slider.trigger('slideTo', [5, 'fast']); // define speed

— Reply to this email directly or view it on GitHubhttps://github.com/lemmon/Lemmon-Slider/issues/6#issuecomment-13441595.

smlombardi avatar Feb 12 '13 17:02 smlombardi

Current slide has always class active. You can count the number of slides before it. It's a bit of a stretch but this plugin was build as lightweight as possible. I am working on newer version with a little bit more functionality to address these issues.

lemmon avatar Feb 12 '13 18:02 lemmon

sorry but I don't know where I should paste $slider.trigger('slideTo', [4]); // slides to the 5th item (range: 0..n-1) to be have triger ;( Tell me where?

adax89 avatar Apr 27 '13 12:04 adax89