Событие contextMenu неправильно назначает верхний атрибутJquery

Программирование на jquery
Ответить
Anonymous
 Событие contextMenu неправильно назначает верхний атрибут

Сообщение Anonymous »


I used other examples I've found to create two fiddles to invoke a custom context menu. In the first, it's barebones and it works as expected, namely: set a previously hidden div to visible and move it to the top and left position of the mouse click.

https://jsfiddle.net/wolfie7873/unp53bhs/

In the simple example, the rightmost 2 columns have the custom contextmenu and the div appears where one right-clicks.

Trying to incorporate this into my actual use-case, and things don't work quite the same. Specifically, the visibility property as well as the left property are dynamically changed as expected, but the top property stays as the default of 0. You can see this in the second fiddle:

https://jsfiddle.net/wolfie7873/ksm8cxrb/1/

In this one, the columns with the pale-yellow headers are the ones that should invoke the contextMenu. The div for the context menu appears, but always at the top of the page.

Why isn't the top attribute being properly reassigned?


Источник: https://stackoverflow.com/questions/781 ... -attribute
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Jquery»