---
title: "How to get .outerHeight of element if visible"  
description: "How to get .outerHeight of element if visible"  
author: "Anonymous User"  
published: 2015-02-01  
updated: 2015-02-01  
canonical: https://www.mindstick.com/forum/12924/how-to-get-outerheight-of-element-if-visible  
category: "javascript"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# How to get .outerHeight of element if visible

Im woundering if its possible to get .outerHeight() of element only if its is visible

I currently have

[var](https://www.mindstick.com/forum/33920/what-is-different-var-and-dynamic-types-in-c-sharp) $viewItem = $('.[test](https://yourviews.mindstick.com/story/1427/explosive-facts-about-trinity-test-world-s-first-nuclear-bomb)').find('.item');

var viewItemHeight = $viewItem.outerHeight([true](https://yourviews.mindstick.com/view/81326/boycott-chinese-products-dream-will-come-true));

The [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is $viewItem

Will return two [elements](https://www.mindstick.com/forum/1440/wpf-button-with-multiple-text-elements) at a time, one will be hidden. If is possible to test and only get the height of the visible one ?

## Replies

### Reply by Anonymous User

What about the visible selector?

var $viewItem = $('.test').find('.item:visible');

var viewItemHeight = $viewItem.outerHeight(true);


---

Original Source: https://www.mindstick.com/forum/12924/how-to-get-outerheight-of-element-if-visible

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
