Skip to content

Usage when selector isn't available #88

Closed
@mstratman

Description

@mstratman

If a selector isn't available, is there any other way to use this plugin?

For example, given:

$("#container .thing").each(function() {
    $(this).anotherPlugin(); // 
});

If anotherPlugin wants to create a context menu, there appears to be no way to limit its effects to only the .thing elements in #container, since anotherPlugin() does not get a selector.

If contextMenu() can't behave like other jquery plugins (i.e. $(selector).contextMenu()), then can its 'selector' attribute also allow objects in addition to string selectors?
e.g. I could, within anotherPlugin, do something like:

$.contextMenu({ selector: $(this) });

Or am I missing an altogether better solution? thanks,

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