[jQuery] JQuery Cluetip: dynamically set content of local textarea is not populated in clutip popup.

[jQuery] JQuery Cluetip: dynamically set content of local textarea is not populated in clutip popup.


Hi, here is the sample of the code i have been struggling with for
couple hours now. Not sure if this is a bug or anything wrong with my
approach.
If i comment the line:
$('#text1').val('test content'); //set the content of textarea
and set the hardcoded content for textarea:
<textarea id="text1" name="{t:'rv_features',f:'custom_description'}[]"
cols="25" rows="4">test content</textarea>
then seems things would work fine.
But I have to do this programatically as each tr will represent a
datarow and be populated dynamically.
Any idea, help, thought would be great and appreciated.
Thanks,
Code90
----------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<script type="text/javascript" src="/inc/jquery.js"></script>
<script type="text/javascript" src="/inc/jquery.cluetip.js"></script>
<script type="text/javascript" src="/inc/jquery.dimensions.js"></
script>
</head>
<body>
<table>
<tr>
<th>Description</th>
</tr>
<tr nfwdata="template">
<td nowrap="nowrap"><a href="javascript:;" nfwid="toggle_desc"
title="Description">Desc</a>
<div style="display:none;">
<textarea id="text1"
name="{t:'rv_features',f:'custom_description'}[]" cols="25" rows="4"></
textarea>
</div>
</td>
</tr>
</table>
<script type="text/javascript">
//
**************************************************************
$('#text1').val('test content'); //set the content of textarea
//
**************************************************************
desc_ctr=0;
$('[@nfwid="toggle_desc"]').each(function(){
this_1=this;
if($('[@name*="custom_description"]',$(this).parent()).val()!
==''){
$(this).html($(this).html()+'(+)');
}
desc_ctr++;
$(this).attr('rel','#desc_'+(desc_ctr))
.next()
.attr('id','desc_'+desc_ctr)
.end()
.cluetip({
local:true,
hideLocal:true,
sticky:true,
activation:'click',
cluetipClass:'getrv',
arrow:true,
closePosition:'title'
});
});
</script>
</body>
</html>