Context.js
Context.js copied to clipboard
Expose menu data reference to action event and context Object, fixes #7
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();
May I kindly vote for merging Konstantinos Margaritis' pull request for Menu data reference #7 . Seems working just fine.
Konstantinos Margaritis's solution worked perfectly. I respectfully ask that his solution becomes part of base.