small improvement on changing dom solution
arnau idoctnef@openmailbox.org
Wed, 17 Aug 2016 11:44:45 +0200
1 files changed,
13 insertions(+),
2 deletions(-)
jump to
M
class2context.js
→
class2context.js
@@ -12,13 +12,24 @@ [["option1", "functionoption1()"], ["option 2","functionoption2()"]]
); */ -/* testing this, not necessary +/* testing this, not necessary */ +var cmCallNum=0; $( document ).ready(function() { $(document).on('contextmenu', function (e) { //e.preventDefault(); + /*//testing only + console.log('ContextMenus() called, num.' + cmCallNum); + cmCallNum++;*/ ContextMenus(); }); -});*/ + $(document).on('click', function (e) { + //e.preventDefault(); + /*//testing only + console.log('ContextMenus() called, num.' + cmCallNum); + cmCallNum++;*/ + ContextMenus(); + }); +}); /* MUTATION OBSERVER