Skip to content

Expose menu data reference to action event and context Object, fixes #7#14

Open
margaritis wants to merge 1 commit intojakiestfu:masterfrom
margaritis:master
Open

Expose menu data reference to action event and context Object, fixes #7#14
margaritis wants to merge 1 commit intojakiestfu:masterfrom
margaritis:master

Conversation

@margaritis
Copy link
Copy Markdown

Option A: using data selection from event (e.data.selection())

action: function(e) {
    e.preventDefault();
    $(e.data.selection()).css('background',$(e.target).attr('data-background'));
}

Option B: using context

context.selection();

@margaritis margaritis mentioned this pull request Oct 1, 2014
@yahyaerturan
Copy link
Copy Markdown

May I kindly vote for merging Konstantinos Margaritis' pull request for Menu data reference #7 . Seems working just fine.

@briankitt
Copy link
Copy Markdown

Konstantinos Margaritis's solution worked perfectly. I respectfully ask that his solution becomes part of base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants