I have this element:
<div class="progress xs" style="margin-bottom: 0px; height: 3px;">
<div class="progress-bar progress-bar-green" style="width: 100%;"></div>
</div>
I want to get the inline css
property width.
I tried to do this:
$(".progress").find(".progress-bar").css('width');
Which should return '100%
' but returns 638px
instead.
As you can see in my example :
console.log($(".progress").find(".progress-bar").css('width'));
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="progress xs" style="margin-bottom: 0px; height: 3px;">
<div class="progress-bar progress-bar-green" style="width: 100%;"></div>
</div>
Does anyone know how to get the 100%
of the progress-bar
element?