Reputation: 12047
How can I work out the full width of a container where the contents overflow off of the screen?
Here is an example of what I mean - http://jsfiddle.net/TFdLA/. In reality, .inner
has no width set so takes up all of the available width on the screen.
However, if I use $('.inner').innerWidth();
I just get the width of the screen, where as what I would like is the width that .inner
would take up if possible. Thanks
Upvotes: 1
Views: 61
Reputation: 1398
Take a look at $('.inner')[0].scrollWidth
or
$('.inner').each(function(){
this.scrollWidth;
})
which is probably what you need.
Upvotes: 1