Chocolat Versions Save

Chocolat : the lightbox so cool horses use it :horse:

1.0.0-beta.0

5 years ago

Pre-release of Chocolat v1.0.0-beta.0

What's new

Dependencies

Chocolat is not relying on jQuery anymore

Build

Modern build generating :

  • iife module is meant to be imported via script tags.
    <script src="dist/js/chocolat.iife.js"></script>
  • esm module is meant to be imported via import thank to bundlers like webpack.
import Chocolat from 'chocolat'

css import stays the same.

Breaking changes

Instanciation


// old
$('#example1').Chocolat({});

// new
Chocolat(document.querySelectorAll('#example1 .chocolat-image'), {});

imageSelector option has now been removed

Options

imageSelector has been removed separator2 has 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)

0.4.21

5 years ago

Can be imported as a module :

import $ from 'jquery'
import Chocolat from 'chocolat'

$.fn.Chocolat = Chocolat 

Also removed coffeescript, and added prettier.

0.4.20

5 years ago

use jquery 3

0.4.19

6 years ago

Fix #70 & fix #73 (small js error) Fix #72 (Closing fullscreen on IE11 thanks @SilatPerisaiDiri )

0.4.18

7 years ago

Transition when opening for the first time: Fix for issue #59 (Thanks to @willpaige)

0.4.17

7 years ago

One wrapper per instance : Fix for issue #58 (Thanks to @willpaige)

0.4.16

7 years ago

Updated jquery dependency : Use latest version of jquery 1 : see https://github.com/nicolas-t/Chocolat/issues/57

0.4.15

7 years ago

New hooks : Added a new hooks :


$('#example').Chocolat({
    afterInitialize : function () {
        // your code here
    },
    afterImageLoad : function () {
        // your code here
    }
});

Fixed missing var declarations : Missing var declarations made minifying and concatenating failing on some setups. Thanks to @nicolasbinet (see https://github.com/nicolas-t/Chocolat/pull/52) Related issue : https://github.com/nicolas-t/Chocolat/issues/49

0.4.14

7 years ago

afterMarkup: Added a new setting afterMarkup used to manipulate the layout just after it's created. This will move the caption to the top of the image for example


$('#example').Chocolat({
    afterMarkup: function () {
        this.elems.description.appendTo(this.elems.top)
    }
});

imageSource: Added the setting imageSource. It specifies which attribute contains the image source. So you can use chocolat on other tags like a div tag (doesn't support the href attribute) too. Thanks to @Airfighter76 see https://github.com/nicolas-t/Chocolat/pull/41

0.4.13

8 years ago

Can now disable zoom thanks to @benbyford (see https://github.com/nicolas-t/Chocolat/pull/31) Removed unused css thanks to @ptrckvzn (see https://github.com/nicolas-t/Chocolat/pull/33)