i want to to get the height/width of an image inside a hidden div-containter, but .height() and .width() both returns 0 (like expected).
You can't hide it if you want the correct height and width, but you can move it such that it will be out of the screen, and thus effectively hidden. Try this:
var hiddenDiv = $('
').appendTo('body').css({
'position': 'absolute',
'top': -9999
});
var img = hiddenDiv.children('img');
img.height();
img.width();