Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow percentages for x/y/width/height options #2
A suggestion was made to add helpers for testing the nearest element(s) to the top/bottom/left/right edges of the screen.
What would be better is allowing percentage values, that equate to a percentage of the page's width/height, so the above example could be
This could also allow shortcuts like
Added support for percentage strings in version 1.2. A demo is at http://gilmoreorless.github.com/jquery-nearest/demo-edges.html