Weird behavior while setting text property of anchor element
<p>I am seeing very strange behavior while setting text property of "a" element using jQuery.</p>

<p>If i used hard coded value for setting text property then it works fine but when i use variable passed as a parameter to function to set the text property it does not work. </p>

<p>Sample:
if i use following code:</p>

<pre><code>divToBeCopied.children("[id *='anchor']").text('a@b.com');   
</code></pre>

<p>i can see that the hyper link with text a@b.c</p>

<p>but if i use following</p>

<pre><code>function(strEmailAddress)
{
 divToBeCopied.children("[id *='anchor']").text(strEmailAddress);   
}
</code></pre>

<p>then i simply see hyper link with text 'hyperlink'. I am totally lost. Any help greatly appreciated.</p>

<p>Very interestingly if i simply hardcode the value inside the function then it works like charm</p>

<pre><code>function()
{
 var strEmailAddress='tom@a.c'
 divToBeCopied.children("[id *='anchor']").text(strEmailAddress);   
 }
</code></pre>

<p>Thanks
CSC</p>
