title: Passing javascript variable to jquery
body: <p>Im facing some problems what i cannot solve for days now.</p>
  
  <p>I wish to get the Position of an element which is have a uniqe ID</p>
  
  <p>Code:</p>
  
  <pre><code>function e_div_show(sid,ctd)
  {
   var b_fos="t"+sid;
   var pos = $(b_fos).offset();
   alert(pos.top + ' ' + pos.left);
  }
  
  HTML Code:
  &lt;?php
  ...
   echo ('&lt;td ID="t'.$array['S_ID'].'"&gt;...&lt;/td&gt;
  ...
   ?&gt;
  </code></pre>
  
  <p>this is not working..</p>
  
  <p>if i replace the ID to "b_fos" and i comment out the //var b_fos="t"+sid; it working fine.. however in this case the TD ID wont be unique becouse of the php array which generating the code.</p>
  
  <p>Any help please how to define the pos correclty with a javascript variable?</p>