summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/nearest/README.md
blob: cc40c5fed3812d19625c0c0efc5f2ca5ca5872dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
jQuery Nearest Element plugin
======

**Full documentation is at <http://gilmoreorless.github.io/jquery-nearest/>**

**Demo:** <http://gilmoreorless.github.io/jquery-nearest/demo.html>

Method signatures:

 * `$.nearest({x, y}, selector)` - find `$(selector)` closest to x/y point on screen
 * `$(elem).nearest(selector)` - find `$(selector)` closest to elem
 * `$(elemSet).nearest({x, y})` - filter `$(elemSet)` and return closest to x/y point on screen

Reverse logic:

 * `$.furthest()`
 * `$(elem).furthest()`

Intersecting/touching:

 * `$.touching()`
 * `$(elem).touching()`