I am trying to concatenate html inside a variable. I was able to this successfully without any syntax error
htmlstr = "";
htmlstr += "<p>some paragraph";
htmlstr += "<p>another paragraph </p>";
$(list).html(htmlstr);
But when I try to this
htmlstr = "";
htmlstr += "<button class="first"></button>";
htmlstr += "<button class="second"></button>";
$(list).html(htmlstr);
I get an error "Uncaught syntaxerror: Unexpected Identifier from the browser. Am I doing this the wrong way?
\"first\"