jakiestfu / Context.js

Contextual Menus with Twitters Bootstrap.css
http://lab.jakiestfu.com/contextjs/
248 stars 62 forks source link

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

Open margaritis opened 10 years ago

margaritis commented 10 years ago

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();
yahyaerturan commented 10 years ago

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

briankitt commented 10 years ago

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