My HTML like the below (example)
"<i class='la la-angle-double-right'></i>"
Let say I use ajax to load the HTML content and push it into a div (ajaxify concept).
But when I call $(element).html();
it return
"<i class="la la-angle-double-right"></i>"
then make the js face the issue Unexpected identifier at HTMLDivElement...
if I call $(element).text();
its will return '' // empty string
.
The question is how can I take the original HTML via jQuery in my case?
Note: my full content is a full content of a <script>...</script>
.