最佳答案
I have an element and need it's width without(!) vertical scrollbar.
Firebug tells me body width is 1280px.
Either of these work fine in Firefox:
console.log($('.element').outerWidth() );
console.log($('.element').outerWidth(true) );
$detour = $('.child-of-element').offsetParent();
console.log( $detour.innerWidth() );
They all return 1263px, which is the value I'm looking for.
However all other browser give me 1280px.
Is there a cross browser way to get a fullscreen width without(!) vertical scrollbar?