Forums

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

#143317
Eric Gregoire
Participant

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

Here’s a pen that might help :: http://codepen.io/Boogiesox/pen/BrCeD 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!