Custom selector for visual closeness of elements in a specific direction with jQuery based on rendered location and size
<p>I need selectors which are able to retrieve correct results for visual closeness queries like the following:</p>

<ul>
<li><code>$("h2:closestTo('div#example')");</code></li>
<li><code>$("input:below('label:contains(\"Username\")')");</code></li>
</ul>

<p>Closeness and distances should be dependent of the visual location of elements rendered in the web browser (and differs for different window sizes).</p>

<p>Is there any way to do that with jQuery? I think it will involve the usage of <a href="http://api.jquery.com/offset" rel="nofollow">.offset&#40;&#41;</a></p>
