Detecting width: auto in jQuery
问题 I'm retrieving the width of elements using jQuery and would prefer it if I could have an indication of whether there was an explicit width (and height) specified. <div id="test"></div> <script type="text/javascript"> $(function() { alert($('#test').css('width')); }); </script> This will alert the implicit width of the div in terms of how many pixels it takes up on the client's screen. Is there any way that if the width is either missing or set as width: auto that it can be verified using