copy_id = ' id="copy_clip_button"'\r
}\r
\r
- if (options.event != undefined) {\r
+ if (options.event != undefined && options.event.pageX != undefined && options.event.pageY != undefined) {\r
options.pos = {x: options.event.pageX, y: options.event.pageY};\r
+ } else if (options.event.currentTarget != undefined) {\r
+ var el = jQuery("#" + options.event.currentTarget.id);\r
+ var position = el.offset();\r
+ options.pos = {\r
+ x: position.left,\r
+ y: position.top\r
+ }\r
}\r
\r
var html = '<div class="dialog ' + options.extra_class + '" style="display: none; z-index: 999;">'\r