Results 1 to 2 of 2

Thread: JS onmouseover / JQUERY mouseover: mouse position correction needed

Hybrid View

  1. #1
    Join Date
    Jul 2010

    JS onmouseover / JQUERY mouseover: mouse position correction needed

    I have function/event which should be applied on all images which are under span tag. The getMousePos function gets actual position of the mouse. It should evaluate whether the mouse cursor is in the center of the image and that run zoom function. My problem is that the getMousePos gets position of the mouse only at the point, where I entered border of the image. Of sure, I need to get actual position of the mouse in the image. Image which has coords 100,100-200,200 should detect mouse position like 125,150 and similar not only the edge values like 100,200...

    $(function() {
    $("span img").mouseover(
    getMousePos($(this), zoom);
    How to correct?

  2. #2
    Join Date
    Dec 2012
    You want to use the mousemove event instead of mouseover to keep track of where the mouse is.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center