I have a script with which at a certain point I’m getting HTML(data) with Ajax call. I have to turn this HTML in to plain text like this:
$("#div").text(data);
I now want to turn this around and make the text HTML again. I there an easy Jquery method of doing this? I tried:
$("#div").text(data).end().html();
No luck.
You would need to hold onto the original response to do this…
Then you could get it back out…
Update based on comment…
You can remove that element before you display it…
Where the cookie message has
id="cookiediv"– you may need to adjust the selector to get to this div, but it is almost certainly possible to grab it.