1

I have a file upload progress bar but it doesn't show the progress value I inspected it and i saw that its width attribute is progressing and the progress bar is dynamically generated and after upload it disappears:

<div id="pic-progress-wrap" class="progress-wrap"></div> this is the  only code  can see when it is not uploading 

and in uploading

<div class="progress progress-striped active"><div class="progress-bar progress-bar-success" style="width: 23%;"></div></div>

this code can be seen it generated dynamically.

I want to get the width attribute value out and show it inside a span.

Hasib Tarafder
  • 5,773
  • 3
  • 30
  • 44
  • You should [add an event listener on `DOMAttrModified`](http://stackoverflow.com/questions/1397251/event-detect-when-css-property-changed-using-jquery) or use jQuery [*attrchange* plugin](http://meetselva.github.io/attrchange/) to bind a listener function on attribute change of an element. – Hashem Qolami Feb 09 '14 at 12:13
  • if you only want to get width value then use: document.getElementById("abc").children[0].style.width where abc is parent div id – Siddique Mahsud Feb 09 '14 at 12:26

0 Answers0