Skip to content

Bug in dataAttr? #712

Open
Open
@sophanox

Description

@sophanox

I believe this bit of code:

                if(opt.dataAttr){
                    $.each(opt.dataAttr, function (key, item) {
                        opt.$menu.attr('data-' + opt.key, item);
                    });
                }

Should in fact be:

                if(opt.dataAttr){
                    $.each(opt.dataAttr, function (key, item) {
                        opt.$menu.attr('data-' + key, item);
                    });
                }

I.e., it should reference the key in the loop not the (non-existent) key property of opt? This at least makes it work for me

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions