Abdul Diaz Abdul Diaz - 1 year ago 96
jQuery Question

Parse Javascript as HTML

I have tried everything. My code doesn't render as HTML, instead it is just raw text.

This is my code:


How do I fix this?

Answer Source

Did you mean to use html() as output?


Or like this with $.parseHTML which is to parse a string into an array of DOM nodes.

var html = $.parseHTML(quiz[currentquestion]['question']);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download