-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of positioning #66
Comments
I assume you have jQuery UI position loaded: $.contextMenu({
selector: '.foobar',
// …
determinePosition: function($menu) {
// .position() is provided as a jQuery UI utility
// (...and it won't work on hidden elements)
$menu.css('display', 'block').position({
my: "right top",
at: "left bottom",
of: this,
offset: "0 5",
collision: "fit"
}).css('display', 'none');
}
}); |
Thankyou for your response. I generate my Javascript / jQuery dynamically from a PHP Class. I had not been able to make contextMenu with positioning work without a syntax error. Having received your reply, I still received a syntax error but was then able to address the problem by escaping the $menu ($menu). However still no joy. I have discovered that the if / else that tests whether ui.postion is loaded was testing false. My jQuery UI is 1.8.18 and I believe that it ui.position is loading as part of it. I use it for Tip positioning. Escaping the $menu may also have some effect but I cannot progress without making this adjustment. I am able to achieve the result I desire in my specific project by adjusting the offset x and y on the fly but this is not entirely satisfactory. I am not certain that you can do anything about this but I thought I would like to say thanks and let you know in case someone else reports a similar problem. |
Sorry to be a nuisance. Can you provide practical example of positioning Context Menu, ideally bottom left of calling element.
The text was updated successfully, but these errors were encountered: