The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JS Mouse location detect Re: JS Mouse location detect

Eric Gregoire

Could you just put another div inside at the size you need and assign a click event?

Here’s a pen that might help :: it gets coords relative to a targeted element (perhaps your 40% or 60% element if possible).

Otherwise, please provide an example or try and explain more thoroughly. Thanks!