I am trying to get a list of CSS properties of an overridden element, for example:
.div{
position:absolute;
top:10px;
}
When we use this code:
jQuery('.div').css('bottom');
I get:
bottom:-10px;
If I use get computed or jquery.css, I will get the same result, but actually I want to get:
empty or null
because I did not specify / redefine.
The values expected in this example are: top: 10px bottom: auto or null or nothing
https://codepen.io/anon/pen/dvvdVv
Again, I only need properties that have been overridden.
====================== EDIT ============================= =========================
My goal is only to get the value top,bottomfrom the following element:
<div id='box' class='giveItSomeTop' style="top:10px"></div>
and css for the item, note that I only specified top:
.giveItSomeTop{
top:10px;
}
. :
$('#box').css('top');
: 10px
:
$('#box').css('bottom');
700px, empty, nothing, null ''