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

Added an option to optionally specify a selector to read the image sizes from #6

Closed mikekloeden closed 11 years ago

mikekloeden commented 11 years ago

Added an imgSizeItemSelector option to optionally specify a selector rather than using the img element to read the image sizes.

Example

This would use the first matching element with class fancy-item within the list to fetch the image sizes from:

$('#carousel').elastislide({
    imgSizeItemSelector: '.fancy-item'
});
<ul id="carousel" class="elastislide-list">
    <li><div class="fancy-item">Any content</div></li>
    …
</ul>