Finding which elements in the page  share the left and the right edges with any component
<p>How to find which elements share their right edge with the left edge of an component and which components share their left edge with the right edge of the component? So my function takes a single id say X and returns me a Java script object like </p>

<pre><code>{

leftElements = [leftElement1,leftElement2,...],

rightElements = [rightElement1,rightElement2,...],

}
</code></pre>

<p>So leftElements will contain an array of ids of components that share their right edge with the left edge of the argument to the function and rightElements  will contain their left edges aligned with the right edge of the argument . The argument will be a string id.</p>

<p>So when I do elements('x') , i get an object like the above .</p>
