mobify / pikabu

Off-Canvas flyout menu
http://mobify.github.io/pikabu/
MIT License
453 stars 51 forks source link

Pikabu 2.0: Non-standard classes don't work #60

Closed stewartyu closed 8 years ago

stewartyu commented 8 years ago

Pikabu 2.0 works if you use the default class names in your HTML, but not if you try to specify different classes upon initialization.

For example:

    var pikabu = $('.m-pikabu-left').pikabu({
            container: '.m-pikabu-container',
            appendTo: '.m-pikabu-viewport',
            effect: drawerLeft,
            zIndex: 2,
            coverage: '80%',
            easing: 'swing',
            duration: 200,
            shade: {
                zIndex: 2
            }
        });

This will correctly update this.options, however, this does not update the classes object. Because we access both this.options and classes within Pikabu, this is causing inconsistent behaviour.