Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use the jQuery object that has been passed into the IIFE #68

Merged
merged 1 commit into from

2 participants

Donovan Buck Rodney Rehm
Donovan Buck

We should use the jQuery object that has been passed into contextMenu's IIFE in case the global jQuery name has been freed by jQuery.noConflict( true )

Donovan Buck dtex Changed to use jQuery object that is passed in
We should use the jQuery object that has been passed into contextMenu's IIFE in case the global jQuery name has been freed by jQuery.noConflict( true )
8ee0634
Rodney Rehm rodneyrehm merged commit 8c404b0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 20, 2012
  1. Donovan Buck

    Changed to use jQuery object that is passed in

    dtex authored
    We should use the jQuery object that has been passed into contextMenu's IIFE in case the global jQuery name has been freed by jQuery.noConflict( true )
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/jquery.contextMenu.js
8 src/jquery.contextMenu.js
View
@@ -252,7 +252,7 @@ var // currently active contextMenu trigger
click: function(e) {
e.preventDefault();
e.stopImmediatePropagation();
- $(this).trigger(jQuery.Event("contextmenu", { data: e.data, pageX: e.pageX, pageY: e.pageY }));
+ $(this).trigger($.Event("contextmenu", { data: e.data, pageX: e.pageX, pageY: e.pageY }));
},
// contextMenu right-click trigger
mousedown: function(e) {
@@ -277,7 +277,7 @@ var // currently active contextMenu trigger
e.preventDefault();
e.stopImmediatePropagation();
$currentTrigger = $this;
- $this.trigger(jQuery.Event("contextmenu", { data: e.data, pageX: e.pageX, pageY: e.pageY }));
+ $this.trigger($.Event("contextmenu", { data: e.data, pageX: e.pageX, pageY: e.pageY }));
}
$this.removeData('contextMenuActive');
@@ -306,7 +306,7 @@ var // currently active contextMenu trigger
hoveract.timer = null;
$document.off('mousemove.contextMenuShow');
$currentTrigger = $this;
- $this.trigger(jQuery.Event("contextmenu", { data: hoveract.data, pageX: hoveract.pageX, pageY: hoveract.pageY }));
+ $this.trigger($.Event("contextmenu", { data: hoveract.data, pageX: hoveract.pageX, pageY: hoveract.pageY }));
}, e.data.delay );
},
// contextMenu hover trigger
@@ -1176,7 +1176,7 @@ $.fn.contextMenu = function(operation) {
if (operation === undefined) {
this.first().trigger('contextmenu');
} else if (operation.x && operation.y) {
- this.first().trigger(jQuery.Event("contextmenu", {pageX: operation.x, pageY: operation.y}));
+ this.first().trigger($.Event("contextmenu", {pageX: operation.x, pageY: operation.y}));
} else if (operation === "hide") {
var $menu = this.data('contextMenu').$menu;
$menu && $menu.trigger('contextmenu:hide');
Something went wrong with that request. Please try again.