Function this.text=text; to html
<p>I have some code for a tootlip in a calendar. i want to be able to display html in the tool tip is this possible? every time i try and change it to accept html it crashes it only allows text right now and i do not understand how to change it to allow for html</p>

<pre><code>        &lt;!DOCTYPE html&gt;
        &lt;html&gt;
        &lt;head&gt;
          &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;
          &lt;title&gt;&lt;/title&gt;

          &lt;script type='text/javascript' src='http://code.jquery.com/jquery-1.8.2.js'&gt;&lt;/script&gt;

          &lt;link rel="stylesheet" type="text/css" href="/css/normalize.css"&gt;
          &lt;link rel="stylesheet" type="text/css" href="/css/result-light.css"&gt;


              &lt;link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"&gt;
              &lt;script type='text/javascript' src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"&gt;&lt;/script&gt;


          &lt;style type='text/css'&gt;
            .pink &gt; a {
            background-color: pink !important;
            background-image:none !important;
        }

        .green &gt; a {
            background-color: green !important;
            background-image: none !important;
        }

          &lt;/style&gt;



        &lt;script type='text/javascript'&gt;//&lt;![CDATA[
        $(window).load(function(){
        var Event = function(text, className) {
            // would like to convert this to allow for html
            this.text = text;
            // this.html = text; // does not work
            this.className = className;
        };

        var events = {};
        events[new Date("01/01/2013")] = new Event("New Years Day", "pink");
        events[new Date("12/25/2012")] = new Event("&lt;B&gt;Merry&lt;/b&gt; Christmas", "green");

        console.dir(events);

        $("#dates").datepicker({
            beforeShowDay: function(date) {
                var event = events[date];
                if (event) {
                    return [true, event.className, event.text];
                }
                else {
                    return [true, '', ''];
                }
            }
        });
        });//]]&gt;

        &lt;/script&gt;


        &lt;/head&gt;
        &lt;body&gt;
          &lt;div id="dates"&gt;&lt;/div&gt;


        &lt;/body&gt;


        &lt;/html&gt;
</code></pre>

<p>thank you in advance for any code or help you may provide</p>

<p>Johnny</p>
