FnordMetric.widgets.htmlWidget = function(){ function render(opts){ opts.elem.append( $('
').html(opts.title) ).css({ 'marginBottom': 20, 'overflow': 'hidden' }); var container = $('') .addClass('html_container') .html(opts.html); opts.elem.append(container); } return { render: render }; }