I’m trying to get the width of an element with jQuery and then paste it into a span.
Thing is the .width() gives me the width in pixels, but what I want is the width is percentual.
What I’m trying to do is to get the width of a progressbar and paste it into a span but this line var wit = progress.find(".ui-progressbar-value").width(); will give me the value in pixels. Anyway to have that value in % instead?
I’m trying to get the width of an element with jQuery and then paste
Share
Ok, took me a minute trying to find example, finally i just said “screwit” and made you a fresh fiddle here: http://jsfiddle.net/SpYk3/3n3Mb/
It shows first hand how to:
FYI: with a little use of css, you could position it anywhere on the bar you want pretty easy, just hit this up if you need more help with that too