javascript - How to get relative cursor position to clicked element when appears click event in JQuery? -


I want to read the position relative to the clicked element e.target instead of the eventObject I am PageX and eventObject.pageY . var eventObject = null; $ (Document). Click (function (e) {eventObject = e; // How to get position regarding e.target ??});

Have you tried:?

  var posx = $ (this). composition (). Left, pause = $ (this). composition (). Top; Warning ((e.pageX - posX) + ',' + (E.P.G.I. - Possi));    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -