Skip to content

Add class to container when Macy is initialized? #93

@nickpish

Description

@nickpish

First off, thank you for a fantastic light-weight masonry plugin! I'm wondering how I might add a macy-init class to the container element when Macy has initialized? I've tried the following using an event key, but it doesn't seem to be working:

let macy = Macy({container: '.container'});
macy.on(macy.constants.EVENT_INITIALIZED, function() {
   var container = document.querySelector('.container');
   container.classList.add('macy-init');
});

Thanks for any insight here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions