I have problem while convert html to javascript variable.
My HTML Code
<div onclick="openfullanswer('2','Discription part','This is the code part');">
I want to create this html code dynamically, but I have the problem in quote(" and ')
I tried like below
for(i=0;i<result.length;i++)
{
strVar +="<div onclick='openfullanswer("+result[i].ReplyID+",'"+result[i].Description+"','"+result[i].Code+"');'>Test code</div>";
}