I’d say the best way is to compute it yourself:
var width = $('#someElt').width();
var parentWidth = $('#someElt').offsetParent().width();
var percent = 100*width/parentWidth;
More Related Contents:
- Getting the actual, floating-point width of an element
- How to change the element of another div by clicking and hovering on an element of a different div
- Hide/Show div on specific page with jquery
- CSS block doesn’t show click on a button
- Issue with a design when content increase [closed]
- Dropdown Z-index not responding [closed]
- How to change color of SVG image using CSS (jQuery SVG image replacement)?
- Auto-size dynamic text to fill fixed size container
- Firing events on CSS class changes in jQuery
- Downloading jQuery UI CSS from Google’s CDN
- jQuery – Get Width of Element when Not Visible (Display: None)
- Create a CSS rule / class with jQuery at runtime
- How do I get background image size in jQuery?
- jquery IE Fadein and Fadeout Opacity
- jQuery CSS – Write into the -tag
- Remove CSS from a Div using JQuery
- Correct way to animate box-shadow with jQuery
- How to find the highest z-index using jQuery
- Selecting only first-level elements in jquery
- Changing Body Font-Size based on Font-Family with jQuery
- How to expand ‘select’ option width after the user wants to select an option
- Get the value of -webkit-transform of an element with jquery
- jQuery/CSS: line-height of “normal” == ?px
- How to hide/remove a DIV when empty
- Trying to make multiple background images cycle through a slideshow with CSS and JQUERY
- Leave menu bar fixed on top when scrolled [closed]
- Change the body background image with fade effect in jquery
- How add spaces between Slick carousel item
- Fading elements in and out without changing the layout of the page
- Custom CSS to allow chrome textarea resize smaller than initial state?