I need the following code in a variable rendered as html and not as a string:
<div style="display:table-cell; vertical-align:middle">
<center>
<h1>TO THE TIME</h1>
<script type="application/javascript">
var myCountdown1 = new Countdown({
//year : 2015,
month : 11,
day : 11,
hour : 00,
ampm : "am",
minute : 00,
second : 00,
width:290,
height:60,
rangeHi:"month",
rangeLo:"seconds",
style:"flip"
});
</script>
</center>
</div>
I tried storing it as
htmlcontent[idgrab] = '<div style="display:table-cell; vertical-align:middle">'+
'<center>'+
'<h1>TO THE TIME</h1>'+
'<script type="application/javascript">'+
'var myCountdown1 = new Countdown({'+
'month : 11,'+
'day : 11,'+
'hour : 00,'+
'ampm : "am",'+
'minute : 00,'+
'second : 00,'+
'width:290,'+
'height:60,'+
'rangeHi:"month",'+
'rangeLo:"seconds",'+
'style:"flip"'+
'});'+
'</script>'+
'</center>'+
'</div>';
But that didn't work, basically I have code that pulls dynamically created html which I managed to grab using .html however this one I've only managed to show up as either a string using ""; or break the site entirely.
Edit:
The normal renderer pulls code with this:
htmlcontent[idgrab] = $('#'+idgrab).html();
which works fine for basic html that does not include javascript but for this div in particular, it seems to need to be manually slotted into the array which im having trouble with because the div needs to be stored WITHOUT executing the javascript code (it needs to be executed after the array is invoked).