How to dynamically append script tag to dynamically genarated div?
Eg:
<div class="test abc">
abc
</div>
My code:
var count = 0;
$("div.test abc").append("<div id=" + "check" + count + ">"
+"<script type = 'text/javascript'>"
+ "thirdpartyfunction(function(){});"
+ "</script>"
+ "</div>");
count++;
The above code just appends <div id="check0"> </div>
It does not append the script tag and anything thats inside it.
You are missing a "