Question about converting a simple function to JQuery?
<p>Sorry if this is a stupid question,</p>

<p>I have a javascript function like: </p>

<pre><code>Test.prototype.createElement = function() 
{ 
 this.oCanvas = document.body; 
 var oDiv = document.createElement('div'); 
 oDiv.style.position = "absolute"; 
this.oCanvas.appendChild(oDiv); 
return oDiv; 
}
</code></pre>

<p>While converting this function to jQuery, I did this: </p>

<pre><code>Test.prototype.createElement = function() 
{ 
 this.oCanvas = document.body; 
 var oDiv = $('&lt;div /&gt;').attr("postion", "absolute"); 
 $(this.oCanvas).append(oDiv); 
 return oDiv; /*  ****** This is not correct I think ******* */ 
}
</code></pre>

<p>or is there a better way?</p>
