codrops / Elastislide

Elastislide is a responsive image carousel that will adapt fluidly in a layout. It is a jQuery plugin that can be laid out horizontally or vertically with a pre-defined minimum number of shown images
362 stars 111 forks source link

How can position the carousel on the link active? #18

Open vnt opened 11 years ago

vnt commented 11 years ago

Hi Codrops, elastislide is fantastic! How can position the carousel on the link active?

Es. http://demo2.vedanet.it/mr-liena-integratori

If you are Anasterol the page, the carousel is positioned correctly. http://demo2.vedanet.it/anasterol

If you are the page Flavion, the carousel is positioned on Anasterol instead of Flavion.

Thanks alot for your help. D.

Vadorequest commented 10 years ago

An active link would be great, as well as an automatic focus on the image when load the page, when we load a specific image in the slider that isn't the first one for instance.

In the meantime, any way to move the slider to focus on a specific image? DIdn't find any API so far.

Vadorequest commented 10 years ago

Done. I added the active class by myself.

$('#elastislide_gallery').elastislide({
      minItems : 2,
      start: $('.elastislide-list .active').closest('li').index()
    });