Using Script Tags As Data Contains In AJAX-Powered jQuery

<!--- Bulid the query to be used in the demo. --->
<cfset qGirl = QueryNew( "" ) />
 
<!--- Add the ID column. --->
<cfset QueryAddColumn(
	qGirl,
	"id",
	"cf_sql_integer",
	ListToArray( "1,2,3,4,5" )
	) />
 
<!--- Add the name column. --->
<cfset QueryAddColumn(
	qGirl,
	"name",
	"cf_sql_varchar",
	ListToArray( "Libby,Molly,Sarah,Kim,Kit" )
	) />
 
 
<!--- Return the rendered HTML. --->
<cfoutput>
 
	<tbody>
		<cfloop query="qGirl">
 
			<!---
				We need to create a unique ID for the row so that
				the JSON meta data can be associated with it.
			--->
			<cfset strRowID = "row-#CreateUUID()#" />
 
			<!--- Send meta data. --->
			<script
				type="text/x-json"
				rel="#strRowID#"
				class="metadata">
				{
					id: #qGirl.id#,
					name: "#HtmlEditFormat( qGirl.name )#"
				}
			</script>
 
			<tr id="#strRowID#">
				<td>
					#qGirl.id#
				</td>
				<td>
					#qGirl.name#
				</td>
				<td>
					<a class="delete">Delete</a>
				</td>
			</tr>
 
		</cfloop>
	</tbody>
 
</cfoutput>

For Cut-and-Paste