So I am pulling information from google calendar and I need to divide the variables I am receiving so I can display them in different divs. So what i need to do is something like this
var divMonth = '<div id ="rawr">';
var divMonthClose = '</div>';
dateString = divMonth + monthName + divMonthClose + ' | ' + parseInt(dateMonth, 10);
However, as you imagine the result displayed is…
"<div id ="rawr">December</div> | 8"
It does not actually interpret the html and make the div layer. So my question is.. How can i insert html code within the variable so it actually works as html? Is there a function I am missing or is it even possible?
Thanks in advance for any help or ideas you might have!
You have this post tagged as jquery, so you could do something like so: