I am having a problem with getting the outer height of a list item - similar to the below post: jQuery: Get height of hidden element in jQuery
Here is my code:
function tabload() {
$('.tab li:first-child').addClass('selected');
$(".tab ul").css({ 'position': 'absolute', 'visibility': 'hidden', 'display': 'block'});
var h = $(".tab ul").outerHeight(true);
$(".tab ul").css("height", h);
$(".tab ul").css({'position': 'relative', 'visibility': 'visible', 'display': 'none' });
};
Am i doing something wrong?