+ function Engine() {
var createObject = function(elemClass, height, width){
this.element = document.createElement('div');
$(this.element).addClass(elemClass)
$(this.element).css('height', height);
$(this.element).css('width', width);
};
var box1 = new createObject('box', 200, 400);
$('body').append(box1.element);
}();
Why does the following code provide no error? yet it also does not create the div within the body tag. Lets assume the body is empty. Any help will be greatly appreciated.
Thanks,