I like to create an object myself like so:
function Table()
{
};
Table.prototype.toString = function ( )
{
return '<table><tr><td></td></tr></table>';
};
var table = new Table();
$('body').append(table);
However did failed. So what is the trick to pull this off for your own objects? Something similiar can be seen with image.
var image = new Image();
image.src = '//some_image.jpg';
$('body').append(image);
Now I am not interested in the equilevant of table. Table is just an example of my own object.
Try this
Something that definetly works: