In relation to this line:
this.helpOverlay.append(this.content);
Is it this.helpOverlayalready part of the DOM? Any element that is not inserted in the DOM will return 0 in height and width until it is inserted.
Edit:
this.content.css( 'display', 'none' ).appendTo( 'body' );
var dims = { 'height': this.content.height( ),
'width': this.content.width( ) };
this.content.detach( );
source
share