For example given two divs like this:
.example{
width: 200px;
height: 200px;
z-index: 4;
}
<div id="first" style="height:100px;width:200px;z-index:5;">Hardcoded</div>
<div id="second" class="example" >Css</div>
How can i detect by jquery/javascript if, for example, the height of the div is set by style attribute? Or how can i detect by jquery/javascript if the height is set but not by a css class?
It seems there is a bunch of misunderstand what i'm really asking, altough one answer was pretty close but deleted: The question is not "which value is set for the height". or "does the div has a specific class set" Given a specific style property like 'height'. I want to know two things:
- Is the height set in any non-browser-default way like by a css class or style? (i think i can get by myself)
- If yes, is the height set by the style="...." attribute or by a class=""? Which class doesnt matter.