Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
查看 jQuerify。它将 jQuery 作为书签加载,之后您可以与 DOM 进行交互。 Firebug Lite 中也存在同样的内容。
只需向主体添加一个侦听器来侦听第一次鼠标按下/单击某个元素并将其存储在某些数据结构(如数组)中。您可能可以将事件链接在一起以尝试将其到达您想要的位置。
根据您正在做的事情,您也可以使用元素的坐标进行一些空间检测。
Check out jQuerify. It loads jQuery as a bookmarklet, after which you can interact with the DOM. The same sort of stuff exists in Firebug Lite.
Just add a listener to the body to listen for the first mousedown/click on an element and store it in some data structure (like an array). You could probably chain events together to try to get it where you want.
Depending what you're doing, you could do some spatial detection using the coordinates of the element too.