Line 87...
I'd say...
$('#' + id).length === 0 
... would be the way to do this that most blogs agree with

Line 91...
I've not seen elements being built this way.  The typical way to do this is:
$('<div />).
    attr('id', id).
    addClass(plotContainerClass);

Line 95 should be:
$('<h2 />').text(text);