Helps to determine all elements that have a certain position or area in common by providing
jQuery.fn.within. The following example returns all
div elements on the point 200px left and 200px from the top:
$(el).withinBox(left, top, width, height) to get all elements within a certain area:
$('*').withinBox(200, 200, 100, 100)
jQuery.event.drag uses $.within to determine dropable elements at the current position.
jQuery(el).withinBox(left, top, width, height)
Returns all elements matching the selector that have a given area in common: $('*').withinBox(200, 200, 100, 100)
Move the mouse in the following example and it will show the ids for
div elements within the current mouse position:
the position from the left of the page
the position from the top of the page
the width of the area
the height of the area
cache the dimensions and offset of the elements.
a jQuery collection of elements whos area overlaps the element position.