Closed
Description
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,