All Projects → gilmoreorless → Jquery Nearest

gilmoreorless / Jquery Nearest

Licence: mit
Find the elements in a page that are closest to a particular point or element, based on pixel dimensions

Programming Languages

javascript
184084 projects - #8 most used programming language

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()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].