Closed nicolas-t closed 4 years ago
New usage :
// old
$('#example1').Chocolat({});
// new
Chocolat(document.querySelectorAll('#example1 .chocolat-image'), {});
imageSelector
option has now been removed
setTitle
is a function returning a string (the title of the set)
pagination
is a function returning a string (the pagination)
description
is a function returning a string (the description)
removed separator2
settings
renamed :
firstImage
=> firstImageIndex
lastImage
=> lastImageIndex
currentImage
=> currentImageIndex
container
must be an element (no string nor jquery objects)
enableZoom
=> allowZoom
fullScreen
=> allowFullScreen
api()
=> api
api.place
=> api.position
settings.images
should now be passed as first argument :
Chocolat([{ src }, { src }, ..], {options})
Use rollup and babel to generate module. The objective is to get rid of jquery in the middle term.
todo:
:warning: New documentation is here : https://chocolat.gitbook.io/chocolat/